On Thu, Oct 7, 2010 at 2:33 AM, Victor Ruotti <ruotti@wisc.edu> wrote:
Thanks Peter, I updated to python 2.5 and got the same error. Any ideas? Thanks, Victor
sudo python2.5 scripts/nglims/add_ng_defaults.py universe_wsgi.ini galaxy_dev_1 > sudo python2.5 scripts/nglims/add_ng_defaults.py universe_wsgi.ini scripts/nglims/add_ng_defaults.py:51: Warning: 'with' will become a reserved keyword in Python 2.6 File "scripts/nglims/add_ng_defaults.py", line 51 with open(config["nglims_config_file"]) as in_handle: ^ SyntaxError: invalid syntax
galaxy_dev_1 > python2.5 Python 2.5.4 (r254:67916, Oct 6 2010, 16:12:31) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
You started Galaxy using Python 2.5, but when Galaxy starts a child process for the python tool it would default to the system python I think, which must still be Python 2.4. One solution I'd try would be to hack the tool's XML file to change <command interpreter="python"> to be explicit, <command interpreter="python2.5"> The better fix would be in scripts/nglims/add_ng_defaults.py to make it Python 2.4 compatible. I think this just means replacing lines 51 and 52, with open(config["nglims_config_file"]) as in_handle: nglims_config = yaml.load(in_handle) with: in_handle = open(config["nglims_config_file"]) nglims_config = yaml.load(in_handle) in_handle.close() Right Brad? ;) Then try again, and hope that is the only thing blocking this from working on Python 2.4. I didn't see any more with statements so fingers crossed. Peter P.S. Current version is here: http://bitbucket.org/chapmanb/galaxy-central/src/tip/scripts/nglims/add_ng_d...