error loading files into galaxy
Hi, I started getting the following error whenever I try to load a file into Galaxy local. Traceback (most recent call last): File "/usr/local/galaxy/galaxy-dist/tools/data_source/upload.py", line 8, in <module> from galaxy import eggs ImportError: cannot import name eggs I will appreciate if someone can tell me what could happen to cause such issue and how to resolve it. Regards,
Hello Hakeem, Did you ever solve this import problem? We suddenly started seeing this on our main (old) Galaxy server, which we have not intentionally changed recently: $ hg log | head changeset: 17125:e837a68e8d14 tag: tip parent: 17121:7a4e3a661a76 parent: 17124:46a4ef8850b5 user: Nate Coraor <nate@bx.psu.edu> date: Fri May 15 15:21:34 2015 -0400 summary: Merge stable to default I suspect either a system update, or an accidental change where I meant to edit the test instance on the same machine, or a new Galaxy instance we're working on using a new VM. Turning on debug level logging, I could deduce the ImportError happens when the local job runner tries to run the upload1 tool's Python script: galaxy.jobs.runners DEBUG 2016-03-04 11:14:17,449 (13809) command is: python /mnt/galaxy/galaxy-dist/tools/data_source/upload.py /mnt/galaxy/galaxy-dist /mnt/galaxy/galaxy-dist/database/tmp/tmp2qzTWC /mnt/galaxy/galaxy-dist/database/tmp/tmpC6Tq0J 16915:/mnt/galaxy/galaxy-dist/database/job_working_directory/013/13809/dataset_16915_files:/mnt/galaxy/galaxy-dist/database/files/016/dataset_16915.dat; return_code=$?; python /mnt/galaxy/galaxy-dist/database/job_working_directory/013/13809/set_metadata_SP3B7H.py /mnt/galaxy/galaxy-dist/database/tmp/tmp2qzTWC /mnt/galaxy/galaxy-dist/database/job_working_directory/013/13809/galaxy.json /mnt/galaxy/galaxy-dist/database/job_working_directory/013/13809/metadata_in_HistoryDatasetAssociation_16276_0wz2tR,/mnt/galaxy/galaxy-dist/database/job_working_directory/013/13809/metadata_kwds_HistoryDatasetAssociation_16276_1IeKfn,/mnt/galaxy/galaxy-dist/database/job_working_directory/013/13809/metadata_out_HistoryDatasetAssociation_16276_cKjsLG,/mnt/galaxy/galaxy-dist/database/job_working_directory/013/13809/metadata_results_HistoryDatasetAssociation_16276_iyGIDI,/mnt/galaxy/galaxy-dist/database/files/016/dataset_16915.dat,/mnt/galaxy/galaxy-dist/database/job_working_directory/013/13809/metadata_override_HistoryDatasetAssociation_16276_K9ebdM; sh -c "exit $return_code" I can reproduce the error at the command line with just: $ python /mnt/galaxy/galaxy-dist/tools/data_source/upload.py Traceback (most recent call last): File "/mnt/galaxy/galaxy-dist/tools/data_source/upload.py", line 8, in <module> from galaxy import eggs ImportError: cannot import name eggs I could hack this script based on how Galaxy adds its libraries to the Python import path, and now uploads work again: $ hg diff tools/data_source/upload.py diff -r c3cef260df88 tools/data_source/upload.py --- a/tools/data_source/upload.py Fri May 15 15:20:17 2015 -0400 +++ b/tools/data_source/upload.py Fri Mar 04 11:12:51 2016 +0000 @@ -5,6 +5,10 @@ # to be reflected in galaxy.web.controllers.tool_runner and galaxy.tools import urllib, sys, os, gzip, tempfile, shutil, re, gzip, zipfile, codecs, binascii + +# Peter hack 2016/03/04 due to unexplained import failure... +sys.path.insert(1, "/mnt/galaxy/galaxy-dist/lib") + from galaxy import eggs # need to import model before sniff to resolve a circular import dependency import galaxy.model However, this is only treating the symptoms rather than the as yet unexplained root cause of the problem. Peter On Thu, Sep 5, 2013 at 8:22 PM, Hakeem Almabrazi <halmabrazi@idtdna.com> wrote:
Hi,
I started getting the following error whenever I try to load a file into Galaxy local.
Traceback (most recent call last):
File "/usr/local/galaxy/galaxy-dist/tools/data_source/upload.py", line 8, in <module>
from galaxy import eggs
ImportError: cannot import name eggs
I will appreciate if someone can tell me what could happen to cause such issue and how to resolve it.
Regards,
___________________________________________________________ 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/
participants (2)
-
Hakeem Almabrazi
-
Peter Cock