PDA

View Full Version : Python version issues?



nateperson
September 4th, 2009, 05:26 PM
So I downloaded a program I'm hoping will work for work from sourceforge.
And I'm having some issues running portions of the program, and right now, I'm guessing its cause I'm running python 2.6.2 version and they were written for some earlier version.

I know Linux is pretty heavily dependent on python so I'm not sure about installing multiple version of python on my system, would it be ok? How do you specify which version you want to run it in?

My python skills are just a little past "Hello world", SO, how hard is it to convert the scripts to 2.6.2? I've read about programs that help you do that, I'm sure they are pretty complex.

What my best option?

Thanks!

unutbu
September 4th, 2009, 07:01 PM
Can you provide a link to the sourceforge page so we may look at the code? Please also post the error message you see when you run the program.

nateperson
September 4th, 2009, 07:51 PM
The sourceforge page is: http://sourceforge.net/projects/ecell/

And the project website, for the portion I'm working with now: http://www.e-cell.org/ecell-models/Projects/SBMLsupport/tool/

Haven't really gotten into the meat of the program yet. Working on getting my model into their format. Here's the error I get, on a test file, which can be found here, same error for both levels/versions:
http://www.systems-biology.org/001/kegg/mtu.html


persont@toxo:~$ ecell3-sbml2eml mtu00010.xml
Traceback (most recent call last):
File "/usr/local/bin/ecell3-sbml2eml", line 98, in <module>
anEml = convertSBML2EML( aSbmlString )
File "/usr/local/lib/python2.6/site-packages/ecell/convertSBML2EML.py", line 176, in convertSBML2EML
anEml.createEntity( 'Variable', aSystemFullID )
File "/usr/local/lib/python2.6/site-packages/ecell/eml.py", line 229, in createEntity
aTargetSystemNode = self.__getSystemNode( aTargetPath )
File "/usr/local/lib/python2.6/site-packages/ecell/eml.py", line 496, in __getSystemNode
raise "System [%s] not found."%aFullID
TypeError: exceptions must be classes or instances, not str


My actual model file is automaticly generated by Pathway-tools (http://biocyc.org/), its viewable and editable in CytoScape (http://www.cytoscape.org/), so I'm pretty sure its good, but I get the same error as the test file.

nateperson
September 4th, 2009, 07:55 PM
Latest version on dependencies and whatnot except for the libsbml, cause the readme says it requires an earlier vesion. Version 3.1.107 of the ecell.

wmcbrine
September 4th, 2009, 10:12 PM
There aren't many version issues when moving up within the 2.x series, but I guess it's possible. Huge issues between 2.x and 3.x of course.

There's no problem with installing multiple versions of Python from the Ubuntu repos. The default version in Ubuntu 9.04 will remain 2.6, regardless of which other versions you install. You can change that, but I don't recommend it. To invoke the non-default installations, just type "python2.5", "python3", etc., instead of "python".

nateperson
September 5th, 2009, 10:31 PM
Thanks, I'll give it a try on Monday when I get back to work.

-grubby
September 6th, 2009, 03:19 AM
Using python 2.5 should fix that specific issue, because Python 2.5 still allows raising exceptions using strings. I'm not guaranteeing you won't run into other issues, however.

nateperson
September 7th, 2009, 02:20 AM
One issue at a time. Biggest one is I'm not even sure the program can do the tests my boss wants... But thats for later...

Thanks again!