marbl / metAMOS

A metagenomic and isolate assembly and analysis pipeline built with AMOS
http://marbl.github.io/metAMOS
Other
93 stars 45 forks source link

ImportError: cannot import name Validate when running runPipeline.py #101

Closed chevrm closed 10 years ago

chevrm commented 10 years ago

On a fresh install from https://github.com/treangen/metAMOS/archive/master.zip After

initPipeline -q -1 file1.fastq -2 file2.fastq -d newtest1 -i 300:500

with no errors, trying

runPipeline -a soap,metaidba,metavelvet -b -t -q -u -d newtest1

results in the following error before processing begins:

[Available CPUs: 8] *ok ImportError: cannot import name Validate

Note that this is before any processing so I do not believe there are any associated log files. I think the error comes from where src/findreps.py looks to import Validate in line 7. Maybe I've installed Validate to an incorrect path? I'm unsure how to correct the broken import. Any ideas?

skoren commented 10 years ago

I was able to download/run metAMOS from the archive: % wget https://github.com/treangen/metAMOS/archive/master.zip % unzip master.zip % python INSTALL.py Please double check that the src/ directory contains validate.py and you are using the runPipeline from within metAMOS and not metAMOS/src. If you continue to experience issues, you can try the frozen binary: http://treangen.github.io/metAMOS/ which does not require installation

chevrm commented 10 years ago

src/validate.py does indeed exist and the runPipeline script was run from within ./metAMOS/ so I was unable to resolve this way.

However, I've switched to the frozen binary per your suggestion and analysis (without the -q flag) is underway without errors. Thanks!

chevrm commented 10 years ago

This remains an issue after installing latest release 1.5rc1.

treangen commented 10 years ago

hi chevrm,

many thanks for trying out 1.5rc1 & letting us know, hard to say what is causing the issue without further info but my best guess is that you are indeed calling runPipeline from within your metAMOS install dir but grabbing a different one installed elsewhere. a quick test would be to try './runPipeline' from within MA dir instead of 'runPipeline', or running 'which runPipeline' to confirm its calling the binary you are expecting. I suggest this as your original post indicated you were calling 'runPipeline' and this would explain why you are still having issues in latest release (1.5rc1). If this issue persists it would be most helpful to have both your COMMANDS.log file from ./Logs dir, in addition to pipeline.conf.

and as before, I'd point you to the binary, which will be available as soon as I can finishing building it & get it copied over to the server.

chevrm commented 10 years ago

Hi Todd--

runPipeline is indeed called from within the MA dir as ./runPipeline. All other distributions have been deleted, and no other runPipeline exists from 'which runPipeline'. I will update with COMMANDS.log, pipeline.conf and ./Logs shortly

Thanks!

On Sat, Feb 8, 2014 at 10:45 PM, Todd J Treangen notifications@github.comwrote:

hi chevrm,

many thanks for trying out 1.5rc1 & letting us know, hard to say what is causing the issue without further info but my best guess is that you are indeed calling runPipeline from within your metAMOS install dir but grabbing a different one installed elsewhere. a quick test would be to try './runPipeline' from within MA dir instead of 'runPipeline', or running 'which runPipeline' to confirm its calling the binary you are expecting. I suggest this as your original post indicated you were calling 'runPipeline' and this would explain why you are still having issues in latest release (1.5rc1). If this issue persists it would be most helpful to have both your COMMANDS.log file from ./Logs dir, in addition to pipeline.conf.

and as before, I'd point you to the binary, which will be available as soon as I can finishing building it & get it copied over to the server.

Reply to this email directly or view it on GitHubhttps://github.com/marbl/metAMOS/issues/101#issuecomment-34564622 .

tatumdmortimer commented 10 years ago

I'm also getting the same error when I try to runPipeline:

$ ./runPipeline -d imetamostest17 -p 16 -a spades,masurca,velvet ... [Available CPUs: 32] *ok ImportError: cannot import name Validate

I installed the 1.5rc1 frozen binary on 2/10. I have no other installations of metAMOS, and I'm running from within the metAMOS directory. There isn't anything in the Log directory. initPipeline ran successfully.

Thanks for any help!

skoren commented 10 years ago

Can you run: python import validate print validate.file That will check if there is another validate package on your system interfering with metAMOS. If the import succeeds and the path is not your current metAMOS installation, then modifying runPipeline line 18 from: sys.path.append(INITIAL_SRC) to: sys.path.insert(1, INITIAL_SRC) may fix the error.

As far as the frozen binary, only the OSX frozen binary has been posted, the Linux frozen binary is still in testing so I would advise against using it for now.

tatumdmortimer commented 10 years ago

I did have another validate package on my system. Changing the order of the python path did fix the problem, and it isn't getting hung up there anymore. Thanks!

skoren commented 10 years ago

Fix 965f3430816b0735226e17d5fe462861af70c18e commited.