Opened 9 years ago
Closed 9 years ago
#515 closed defect (fixed)
Opening FASTA file fails
Reported by: | Tom Goddard | Owned by: | Greg Couch |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Sequence | Version: | |
Keywords: | Cc: | pett@…, conrad@…, meng@… | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | Mac OS X (Cocoa 64) | |
Project: | ChimeraX |
Description
Opening the attached fasta file works the first time. Then when I quit ChimeraX and open it again it fails with the following error. From then on it always fails to open the file.
UCSF ChimeraX version: 0.1 (2017-01-06)
OpenGL version: 4.1 NVIDIA-10.14.20 355.10.05.15f03
OpenGL renderer: NVIDIA GeForce GT 650M OpenGL Engine
OpenGL vendor: NVIDIA Corporation
open ~/ucsf/data/ihm-2016/nup84/extra_data/alignments/nup84_3ikoC_3jroC_3f3fG.fa
Traceback (most recent call last):
File "/Users/goddard/Desktop/ChimeraX Jan 6 2017.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/cmd_line/tool.py", line 158, in execute
cmd.run(cmd_text)
File "/Users/goddard/Desktop/ChimeraX Jan 6 2017.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/cli.py", line 2255, in run
result = ci.function(session, kw_args)
File "/Users/goddard/Desktop/ChimeraX Jan 6 2017.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/open.py", line 108, in open
models = session.models.open(paths, format=format, name=name, kw)
File "/Users/goddard/Desktop/ChimeraX Jan 6 2017.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/models.py", line 351, in open
session, filenames, format=format, name=name, kw)
File "/Users/goddard/Desktop/ChimeraX Jan 6 2017.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/io.py", line 368, in open_multiple_data
models, status = open_data(session, fspec, format=format, name=name, kw)
File "/Users/goddard/Desktop/ChimeraX Jan 6 2017.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/io.py", line 328, in open_data
models, status = open_func(session, stream, dname, kw)
File "/Users/goddard/Desktop/ChimeraX Jan 6 2017.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/toolshed/init.py", line 1872, in open_cb
return open_shim(*args, kw)
File "/Users/goddard/Desktop/ChimeraX Jan 6 2017.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/toolshed/init.py", line 1869, in open_shim
return f(*args, format_name=format_name, kw)
File "/Users/goddard/Desktop/ChimeraX Jan 6 2017.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/seqalign/init.py", line 41, in open_file
return open_file(*args, kw)
File "/Users/goddard/Desktop/ChimeraX Jan 6 2017.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/seqalign/parse.py", line 35, in open_file
raise ValueError("No sequences found in %s file '%s'!" % (format_name, fname))
ValueError: No sequences found in FASTA file 'nup84_3ikoC_3jroC_3f3fG.fa'!
Attachments (1)
Change History (6)
by , 9 years ago
Attachment: | nup84_3ikoC_3jroC_3f3fG.fa added |
---|
comment:1 by , 9 years ago
Platform: | all → Mac OS X (Cocoa 64) |
---|
comment:2 by , 9 years ago
Cc: | added |
---|
If I do a make install in bundles/alignments in my development build then it will open the FASTA file correctly the first time I run ChimeraX, and then fails to open it every subsequent time I run ChimeraX.
If I do the make install, run ChimeraX and quit without opening the FASTA file, then run ChimeraX a second time, that also fails to open the FASTA. This suggests the problem is something to do with Toolshed caching something when it first fines a new bundle.
comment:3 by , 9 years ago
Cc: | added; removed |
---|---|
Owner: | changed from | to
The first time the alignment file is opened, the repr() of the stream passed to my open/parse function is:
<_io.TextIOWrapper name='/Users/pett/src/chimera/libs/MultAlignViewer/test/nonassoc.fa' mode='rt' encoding='utf-8'>
The second time it's opened, what's passed in is:
<_io.BufferedReader name='/Users/pett/src/chimera/libs/MultAlignViewer/test/nonassoc.fa'>
comment:4 by , 9 years ago
Cc: | added |
---|
comment:5 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in 10697fb.
The data format encoding information was not saved in the toolshed cache, so restarting ChimeraX causes sequence files to be opened in binary mode instead of text.
Tested with January 6 2017 nightly build on Mac OS 10.12.2