Opened 6 years ago

Closed 6 years ago

#2611 closed defect (fixed)

mmCIF: local variable '_1to3' referenced before assignment

Reported by: d.mann@… Owned by: Greg Couch
Priority: normal Milestone:
Component: Input/Output Version:
Keywords: Cc: Tristan Croll
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Linux-3.10.0-1062.4.1.el7.x86_64-x86_64-with-centos-7.7.1908-Core
ChimeraX Version: 0.9 (2019-06-06)
Description
ISOLDE Plugin:
"Save current model as..." option in the main GUI does not work. Throws the following error:
UnboundLocalError: local variable '_1to3' referenced before assignment

File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-packages/chimerax/atomic/mmcif/mmcif_write.py", line 347, in save_structure
seq_entities[chars] = (eid, _1to3, [c])

See log for complete Python traceback.


Log:
Startup Errors  
---  
error | Bundle 'ChimeraX-Registration' custom initialization failed  
warnings | 'clip' is a prefix of an existing command 'clipper'  
Traceback (most recent call last):  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/core/toolshed/info.py", line 432, in initialize  
api._api_caller.initialize(api, session, self)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/core/toolshed/__init__.py", line 1447, in initialize  
return cls._get_func(api, "initialize")(session, bi)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/registration/__init__.py", line 41, in initialize  
nag(session)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/registration/nag.py", line 29, in nag  
_check_usage(session)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/registration/nag.py", line 167, in _check_usage  
usage = _get_usage()  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/registration/nag.py", line 204, in _get_usage  
usage["dates"].append(datetime.strptime(value, TimeFormat))  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/_strptime.py", line
577, in _strptime_datetime  
tt, fraction, gmtoff_fraction = _strptime(data_string, format)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/_strptime.py", line
359, in _strptime  
(data_string, format))  
ValueError: time data 'Wed Sep 25 09:33:02 2019' does not match format '%a %b
%d %H:%M:%S %Y'  
  
UCSF ChimeraX version: 0.9 (2019-06-06)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open 15_S16_BP_v3-coot-0.pdb

Chain information for 15_S16_BP_v3-coot-0.pdb #1  
---  
Chain | Description  
B | No description available  
  

> open /Users/mann/Desktop/ribosome/v2/cryosparc.mrc

Opened cryosparc.mrc, grid size 360,360,360, pixel 1.19, shown at level 2.09,
step 2, values float32  

> toolshed show ISOLDE

> set selectionWidth 4

Chain information for 15_S16_BP_v3-coot-0.pdb  
---  
Chain | Description  
1.3/B | No description available  
  
Done loading forcefield  
Bad residue number: 1  
Adding hydrogens  
Summary of feedback from adding hydrogens to 15_S16_BP_v3-coot-0.pdb #1.3  
---  
notes | No usable SEQRES records for 15_S16_BP_v3-coot-0.pdb (#1.3) chain B;
guessing termini instead  
Chain-initial residues that are actual N termini: /B ALA 2  
Chain-initial residues that are not actual N termini:  
Chain-final residues that are actual C termini:  
Chain-final residues that are not actual C termini: /B ALA 118  
65 hydrogen bonds  
/B ALA 118 is not terminus, removing H atom from 'C'  
946 hydrogens added  
  
Alignment identifier is 1.3.B  

> select #1

1851 atoms, 1867 bonds, 16 models selected  

> select #1

1851 atoms, 1867 bonds, 16 models selected  

> select #1.1

6 models selected  

> ~select #1.1

Nothing selected  

> set bgColor white

QWidget::repaint: Recursive repaint detected  

Missing filename suffix /Users/mann/Desktop/ribosome/v2/built/isolde_v2  
Traceback (most recent call last):  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/isolde/isolde.py", line 1139, in _save_cif_file  
self.save_cif_file(self._selected_model, filename)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/isolde/isolde.py", line 1152, in save_cif_file  
save.save(self.session, filename, [model])  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/core/commands/save.py", line 61, in save  
fmt.export(session, filename, fmt.nicknames[0], **kw)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/core/io.py", line 213, in export  
result = self.export_func(session, path, **kw)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/atomic/mmcif/__init__.py", line 61, in save_file  
return mmcif_write.write_mmcif(session, path, models=models)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/atomic/mmcif/mmcif_write.py", line 108, in write_mmcif  
save_structure(session, f, models, used_data_names)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/atomic/mmcif/mmcif_write.py", line 347, in save_structure  
seq_entities[chars] = (eid, _1to3, [c])  
UnboundLocalError: local variable '_1to3' referenced before assignment  
  
UnboundLocalError: local variable '_1to3' referenced before assignment  
  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/atomic/mmcif/mmcif_write.py", line 347, in save_structure  
seq_entities[chars] = (eid, _1to3, [c])  
  
See log for complete Python traceback.  
  
Traceback (most recent call last):  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/isolde/isolde.py", line 1139, in _save_cif_file  
self.save_cif_file(self._selected_model, filename)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/isolde/isolde.py", line 1152, in save_cif_file  
save.save(self.session, filename, [model])  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/core/commands/save.py", line 61, in save  
fmt.export(session, filename, fmt.nicknames[0], **kw)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/core/io.py", line 213, in export  
result = self.export_func(session, path, **kw)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/atomic/mmcif/__init__.py", line 61, in save_file  
return mmcif_write.write_mmcif(session, path, models=models)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/atomic/mmcif/mmcif_write.py", line 108, in write_mmcif  
save_structure(session, f, models, used_data_names)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/atomic/mmcif/mmcif_write.py", line 347, in save_structure  
seq_entities[chars] = (eid, _1to3, [c])  
UnboundLocalError: local variable '_1to3' referenced before assignment  
  
UnboundLocalError: local variable '_1to3' referenced before assignment  
  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/atomic/mmcif/mmcif_write.py", line 347, in save_structure  
seq_entities[chars] = (eid, _1to3, [c])  
  
See log for complete Python traceback.  
  




OpenGL version: 3.3.0 NVIDIA 440.33.01
OpenGL renderer: GeForce RTX 2070/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

Change History (2)

comment:1 by Tristan Croll, 6 years ago

Cc: Tristan Croll added
Component: UnassignedInput/Output
Owner: set to Greg Couch
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionmmCIF: local variable '_1to3' referenced before assignment

You're working with the release version of ChimeraX 0.9, which is about 6 months old now. If you update to the latest daily build and reinstall ISOLDE from the ToolShed, you'll find that bug has been fixed (along with many others in both ChimeraX and ISOLDE!) and the version of ISOLDE you'll get is seven dev releases ahead of the version that went with ChimeraX 0.9.

comment:2 by Tristan Croll, 6 years ago

Resolution: fixed
Status: assignedclosed

Old bug from ChimeraX 0.9 release.

Note: See TracTickets for help on using tickets.