ImportError: No module named json

classic Classic list List threaded Threaded
7 messages Options
| Threaded
Open this post in threaded view
|

ImportError: No module named json

Fenglou Mao
I just upgraded our galaxy server to the latest version, and I got this error in many of the tools:

Traceback (most recent call last): File "./scripts/set_metadata.py", line 14, in ? import json ImportError: No module named json


And a "find" command below give many a few json eggs, please help. Why Galaxy is not pickung up this json module?

(galaxy-env)[galaxy@galaxy galaxy-dist]$ find eggs -name "*json*" eggs/psycopg2-2.5.1_9.2.4_static-py2.6-linux-x86_64-ucs4.egg/psycopg2/_json.py eggs/psycopg2-2.5.1_9.2.4_static-py2.6-linux-x86_64-ucs4.egg/psycopg2/_json.pyc eggs/simplejson-2.1.1-py2.4-linux-x86_64-ucs4.egg eggs/raven-3.1.8-py2.6.egg/raven/utils/json.py eggs/raven-3.1.8-py2.6.egg/raven/utils/json.pyc eggs/simplejson-2.1.1-py2.6-linux-x86_64-ucs4.egg eggs/boto-2.5.2-py2.6.egg/boto/jsonresponse.py eggs/boto-2.5.2-py2.6.egg/boto/jsonresponse.pyc eggs/boto-2.5.2-py2.6.egg/boto/sqs/jsonmessage.pyc eggs/boto-2.5.2-py2.6.egg/boto/sqs/jsonmessage.py



___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: ImportError: No module named json

Dannon Baker-2
The json module is included in python's standard library since python 2.6, which is the minimum version of python Galaxy currently supports.  Are you using a python version older than that?

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: ImportError: No module named json

Fenglou Mao
It is a little complicated here, The Galaxy server itself is running CentOS 6 with python 2.6, but the cluster nodes are running CentOS 5 with python 2.4. Mose jobs are running in the cluster nodes.

My questions is:
if there is a json module in galaxy-dist/eggs, why Galaxy is not picking it up? If we can do this, then we don't need to upgrade the cluster nodes, which is very difficult here.

Fenglou


On 20 February 2014 13:47, Dannon Baker <[hidden email]> wrote:
The json module is included in python's standard library since python 2.6, which is the minimum version of python Galaxy currently supports.  Are you using a python version older than that?


___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: ImportError: No module named json

Dannon Baker-2
Got it.  We dropped the simplejson egg during the last release (and any you find are holdovers from previous versions of galaxy) in favor of the stdlib module.  The relevant module from your find would have been simplejson-2.1.1, and the rest are unrelated.

If possible, I'd *really* recommend updating the python version on those nodes as future galaxy developments and tools may count on python 2.6+ (and not just for json, but syntax changes) being available.  Other than that, for those affected tools, you may want to manually revert the changes in revision 11967:0c5e20558f6b and add simplejson back into your galaxy.

That said, I'm working on adding the "anyjson" dependency that will allow json to fail through to any installed json library (whether stdlib, simplejson, etc), and that'll be available in galaxy-central reasonably soon.


On Thu, Feb 20, 2014 at 2:51 PM, Fenglou Mao <[hidden email]> wrote:
It is a little complicated here, The Galaxy server itself is running CentOS 6 with python 2.6, but the cluster nodes are running CentOS 5 with python 2.4. Mose jobs are running in the cluster nodes.

My questions is:
if there is a json module in galaxy-dist/eggs, why Galaxy is not picking it up? If we can do this, then we don't need to upgrade the cluster nodes, which is very difficult here.

Fenglou


On 20 February 2014 13:47, Dannon Baker <[hidden email]> wrote:
The json module is included in python's standard library since python 2.6, which is the minimum version of python Galaxy currently supports.  Are you using a python version older than that?



___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: ImportError: No module named json

Fenglou Mao
Thanks for the answer. I am talking to our sysadmin to upgrade cluster nodes from CentOS 5 to CentOS 6. 

Fenglou

On Feb 20, 2014, at 2:18 PM, Dannon Baker <[hidden email]> wrote:

Got it.  We dropped the simplejson egg during the last release (and any you find are holdovers from previous versions of galaxy) in favor of the stdlib module.  The relevant module from your find would have been simplejson-2.1.1, and the rest are unrelated.

If possible, I'd *really* recommend updating the python version on those nodes as future galaxy developments and tools may count on python 2.6+ (and not just for json, but syntax changes) being available.  Other than that, for those affected tools, you may want to manually revert the changes in revision 11967:0c5e20558f6b and add simplejson back into your galaxy.

That said, I'm working on adding the "anyjson" dependency that will allow json to fail through to any installed json library (whether stdlib, simplejson, etc), and that'll be available in galaxy-central reasonably soon.


On Thu, Feb 20, 2014 at 2:51 PM, Fenglou Mao <[hidden email]> wrote:
It is a little complicated here, The Galaxy server itself is running CentOS 6 with python 2.6, but the cluster nodes are running CentOS 5 with python 2.4. Mose jobs are running in the cluster nodes.

My questions is:
if there is a json module in galaxy-dist/eggs, why Galaxy is not picking it up? If we can do this, then we don't need to upgrade the cluster nodes, which is very difficult here.

Fenglou


On 20 February 2014 13:47, Dannon Baker <[hidden email]> wrote:
The json module is included in python's standard library since python 2.6, which is the minimum version of python Galaxy currently supports.  Are you using a python version older than that?




___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: ImportError: No module named json

Nate Coraor (nate@bx.psu.edu)
Hi Fenglou,

In similar instances, I've simply compiled my own version of Python 2.7 and placed it in a cluster-wide filesystem, then used the environment_setup_file option in universe_wsgi.ini to ensure this version is used when jobs run.

--nate


On Thu, Feb 20, 2014 at 3:31 PM, Fenglou Mao <[hidden email]> wrote:
Thanks for the answer. I am talking to our sysadmin to upgrade cluster nodes from CentOS 5 to CentOS 6. 

Fenglou

On Feb 20, 2014, at 2:18 PM, Dannon Baker <[hidden email]> wrote:

Got it.  We dropped the simplejson egg during the last release (and any you find are holdovers from previous versions of galaxy) in favor of the stdlib module.  The relevant module from your find would have been simplejson-2.1.1, and the rest are unrelated.

If possible, I'd *really* recommend updating the python version on those nodes as future galaxy developments and tools may count on python 2.6+ (and not just for json, but syntax changes) being available.  Other than that, for those affected tools, you may want to manually revert the changes in revision 11967:0c5e20558f6b and add simplejson back into your galaxy.

That said, I'm working on adding the "anyjson" dependency that will allow json to fail through to any installed json library (whether stdlib, simplejson, etc), and that'll be available in galaxy-central reasonably soon.


On Thu, Feb 20, 2014 at 2:51 PM, Fenglou Mao <[hidden email]> wrote:
It is a little complicated here, The Galaxy server itself is running CentOS 6 with python 2.6, but the cluster nodes are running CentOS 5 with python 2.4. Mose jobs are running in the cluster nodes.

My questions is:
if there is a json module in galaxy-dist/eggs, why Galaxy is not picking it up? If we can do this, then we don't need to upgrade the cluster nodes, which is very difficult here.

Fenglou


On 20 February 2014 13:47, Dannon Baker <[hidden email]> wrote:
The json module is included in python's standard library since python 2.6, which is the minimum version of python Galaxy currently supports.  Are you using a python version older than that?




___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/


___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
| Threaded
Open this post in threaded view
|

Re: ImportError: No module named json

Fenglou Mao
Thanks, I will try this tomorrow.

Fenglou


On 20 February 2014 22:32, Nate Coraor <[hidden email]> wrote:
Hi Fenglou,

In similar instances, I've simply compiled my own version of Python 2.7 and placed it in a cluster-wide filesystem, then used the environment_setup_file option in universe_wsgi.ini to ensure this version is used when jobs run.

--nate


On Thu, Feb 20, 2014 at 3:31 PM, Fenglou Mao <[hidden email]> wrote:
Thanks for the answer. I am talking to our sysadmin to upgrade cluster nodes from CentOS 5 to CentOS 6. 

Fenglou

On Feb 20, 2014, at 2:18 PM, Dannon Baker <[hidden email]> wrote:

Got it.  We dropped the simplejson egg during the last release (and any you find are holdovers from previous versions of galaxy) in favor of the stdlib module.  The relevant module from your find would have been simplejson-2.1.1, and the rest are unrelated.

If possible, I'd *really* recommend updating the python version on those nodes as future galaxy developments and tools may count on python 2.6+ (and not just for json, but syntax changes) being available.  Other than that, for those affected tools, you may want to manually revert the changes in revision 11967:0c5e20558f6b and add simplejson back into your galaxy.

That said, I'm working on adding the "anyjson" dependency that will allow json to fail through to any installed json library (whether stdlib, simplejson, etc), and that'll be available in galaxy-central reasonably soon.


On Thu, Feb 20, 2014 at 2:51 PM, Fenglou Mao <[hidden email]> wrote:
It is a little complicated here, The Galaxy server itself is running CentOS 6 with python 2.6, but the cluster nodes are running CentOS 5 with python 2.4. Mose jobs are running in the cluster nodes.

My questions is:
if there is a json module in galaxy-dist/eggs, why Galaxy is not picking it up? If we can do this, then we don't need to upgrade the cluster nodes, which is very difficult here.

Fenglou


On 20 February 2014 13:47, Dannon Baker <[hidden email]> wrote:
The json module is included in python's standard library since python 2.6, which is the minimum version of python Galaxy currently supports.  Are you using a python version older than that?




___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/



___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/