Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#459 closed defect (fixed)

extract_mmCIF_tables returned NULL without setting an error

Reported by: Tom Goddard Owned by: Greg Couch
Priority: major Milestone:
Component: Input/Output Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

I've seen this error several times where extract_mmCIF_tables C++ code returns NULL without setting an error message, but it doesn't seem to happen reproducibly.

sym #1 c8
sym #1 clear
Traceback (most recent call last):
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/cmd_line/tool.py", line 147, in execute
cmd.run(cmd_text)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/cli.py", line 2236, in run
results.append(ci.function(session, kw_args))
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/sym.py", line 67, in sym
assem = pdb_assemblies(m)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/sym.py", line 148, in pdb_assemblies
m.assemblies = alist = mmcif_assemblies(m)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/sym.py", line 158, in mmcif_assemblies
assem, assem_gen, oper, cremap1, cremap2 = mmcif.get_mmcif_tables(model.filename, table_names)
File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/atomic/mmcif.py", line 157, in get_mmcif_tables
data = _mmcif.extract_mmCIF_tables(filename, table_names)
SystemError: <built-in function extract_mmCIF_tables> returned NULL without setting an error

Attachments (1)

asym4.cif.bz2 (6.4 MB ) - added by Tom Goddard 9 years ago.

Change History (5)

by Tom Goddard, 9 years ago

Attachment: asym4.cif.bz2 added

comment:1 by Tom Goddard, 9 years ago

Actually it does seem to happen every time after opening the attached large cif file (that was written by ChimeraX, so it is missing most tables).

comment:2 by Tom Goddard, 9 years ago

This is part of a site-visit demo so I hope it can be fixed soon.

comment:3 by Greg Couch, 9 years ago

Resolution: fixed
Status: newclosed

I wasn't able to reproduce that error with asym4.cif.bz2, but it was obvious in the code how that could happen. If no tables were found, it was returning NULL instead of Py_None. The fix has been committed.

I get the following error after "sym #1 clear":

Traceback (most recent call last):
File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.5/site-packages/chimerax/cmd_line/tool.py", line 147, in execute
cmd.run(cmd_text)
File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.5/site-packages/chimerax/core/commands/cli.py", line 2236, in run
results.append(ci.function(session, **kw_args))
File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.5/site-packages/chimerax/core/commands/sym.py", line 67, in sym
assem = pdb_assemblies(m)
File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.5/site-packages/chimerax/core/commands/sym.py", line 148, in pdb_assemblies
m.assemblies = alist = mmcif_assemblies(m)
File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.5/site-packages/chimerax/core/commands/sym.py", line 158, in mmcif_assemblies
assem, assem_gen, oper, cremap1, cremap2 = mmcif.get_mmcif_tables(model.filename, table_names)
File "/home/gregc/src/chimerax/ChimeraX.app/lib/python3.5/site-packages/chimerax/core/atomic/mmcif.py", line 160, in get_mmcif_tables
data = _mmcif.extract_mmCIF_tables(filename, table_names)
_mmcif.error: open: No such file or directory

comment:4 by Eric Pettersen, 7 years ago

Component: mmCIF Reader/WriterInput/Output

reducing # of categories, so lumping into I/O category

Note: See TracTickets for help on using tickets.