create_engine() fails to pass on constructor methods

0 views
Skip to first unread message

david....@uzh.ch

unread,
Aug 2, 2018, 11:00:45 AM8/2/18
to gc3...@googlegroups.com
Hi everyone,

I'm not sure if I'm missing something or this is a bug. I want to create an engine object with certain attributes set, but create_engine() seems to fails to pass these to the constructor:
>>>>a = create_engine(retrieve_overwrites=True)
>>>>a.retrieve_overwrites
False

Thanks everyone for your help!

Riccardo Murri

unread,
Aug 2, 2018, 11:42:29 AM8/2/18
to gc3...@googlegroups.com
It works for me::

>>> from gc3libs import create_engine
>>> e = create_engine(retrieve_overwrites=True)
>>> e.retrieve_overwrites
True

Are you sure there is no typo in your code? (E.g., `retrieve_overwrite`)
What version of the GC3Pie code are you running?

Ciao,
R

david....@uzh.ch

unread,
Aug 2, 2018, 12:00:14 PM8/2/18
to gc3...@googlegroups.com
I cannot find any typo.
Here is a copied output from shell including the git hash from which I installed python

(gc3pie) david@Schildi:~/Repos/gc3pie$ git rev-parse HEAD
b4a5fa7aff6a36a331d56ae6ae361624fb8526df
(gc3pie) david@Schildi:~/Repos/gc3pie$ cd ~
(gc3pie) david@Schildi:~$ python
Python 2.7.12 (default, Dec  4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> from gc3libs import create_engine
>>> e = create_engine(retrieve_overwrites=True)
>>> e.retrieve_overwrites
False
>>>


-----...@googlegroups.com schrieb: -----
An: gc3...@googlegroups.com
Von: "Riccardo Murri"
Gesendet von: gc3...@googlegroups.com
Datum: 02.08.2018 17:42
Betreff: Re: [gc3pie] create_engine() fails to pass on constructor methods

--
You received this message because you are subscribed to the Google Groups "gc3pie" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gc3pie+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Riccardo Murri

unread,
Aug 6, 2018, 6:32:39 AM8/6/18
to gc3...@googlegroups.com
Hi David,

I'll add a test to check this in the sources, but I still cannot reproduce it.
My guess is that your installation's `*.pyc` files are not in sync with the
source `*.py` (I have seen this happen with Git) so you might be loading
outdated code which shows this bug, while it does not show in the sources.

So my suggestion is that you remove all `*.pyc` files in your GC3Pie
installation
and try again::

find ~/gc3pie -type f -name '*.pyc' -exec rm {} \+

Ciao,
R

David Dreher

unread,
Aug 6, 2018, 7:52:06 AM8/6/18
to gc3...@googlegroups.com
Hi Riccardo,

so I just removed the complete gc3pie folder and reinstalled and that solved the issue. I could have done that earlier :/

It seems to work now!
Reply all
Reply to author
Forward
0 new messages