akokai / commongroups-archived

(archived) Molecular structure-based classification of chemicals in known hazard groups
MIT License
1 stars 0 forks source link

Add script to run CMG batch update routine #14

Closed akokai closed 8 years ago

akokai commented 8 years ago

Try running python run_metacamel.py --help :)

rashupee commented 8 years ago

Hey dude, I am having trouble running this and I think it's because I am using Python 2.7 and not Python 3. Does this sound right?

akokai commented 8 years ago

Yes. I am using 3.5. What problem are you getting? You can create an issue for this if you want. There are ways to fix up the code to make it able to run on either, but it can take a bit of effort. I have not put in that effort...

rashupee commented 8 years ago

It's with urllib, as far as I can tell. Perhaps there are some other imports that will fail, as well. Is the effort involved try/except statements? I guess I'd have to use urllib2 equivalents...

Perhaps I should try to work in Python 3... been putting it off for so long...

akokai commented 8 years ago

If it's this line causing the import error then we can get around it with try ... except. We should look at how other people do it, e.g. requests itself.

IMHO it is both good to keep Python 2 compatibility, and good to move to Python 3... if only for the better unicode support.