Skip to content

Error message for incorrect file format #4

@LeahRoberts

Description

@LeahRoberts

Hi Nabil,

I've been using SeqHandler recently and ran into a problem when trying to convert an embl file. I got this output and wasn't sure what the problem was:

$ SeqHandler convert HVM2289_IS_annotated.embl HVM2289.gbk -i embl -o genbank

ERROR, UNEXPECTED EXCEPTION
'module' object has no attribute 'err'
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SeqHandler-0.7-py2.7.egg/EGG-INFO/scripts/SeqHandler", line 284, in
args.func(args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/SeqHandler-0.7-py2.7.egg/EGG-INFO/scripts/SeqHandler", line 139, in convertMod
sys.err.write("ERROR: ValueError, Could not convert file\n")
AttributeError: 'module' object has no attribute 'err'

$ python ~/bin/seqhandler-master/SeqHandler/SeqHandler.py convert HVM2289_IS_annotated.embl HVM2289.gbk -i embl -o genbank

Traceback (most recent call last):
File "/Users/Leah/bin/seqhandler-master/SeqHandler/SeqHandler.py", line 91, in
import SeqHandler.init as meta
File "/Users/Leah/bin/seqhandler-master/SeqHandler/SeqHandler.py", line 91, in
import SeqHandler.init as meta
ImportError: No module named init

Found out the problem was that the embl file didn't have a correct header, so biopython wasn't able to parse it. It would be great if SeqHandler had some sort of informative error message so that future users can save time trying to figure out the problem.

Thanks - Leah

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions