#814 closed defect (fixed)
Save .obj error
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | normal | Milestone: | Alpha 3 |
Component: | Input/Output | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
I loaded a pdb file (1j8h). Hid chains a,b,d. Saved as Wavefront .obj. Got AttributeError: 'str' object has no attribute ‘all_drawings’ error. Couldn’t find any additional documentation on how to create .obj. Traceback (most recent call last): File "/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/ui/gui.py", line 691, in <lambda> save_action.triggered.connect(lambda arg, s=self, sess=session: s.file_save_cb(sess)) File "/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/ui/gui.py", line 467, in file_save_cb self.save_dialog.display(self, session) File "/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/ui/save_dialog.py", line 133, in display fmt.save(session, filename) File "/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/ui/save_dialog.py", line 40, in save return self._save(session, filename) File "/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/ui/save_dialog.py", line 58, in <lambda> None, None, lambda ses, fn, fmt=fmt: fmt.export_func(ses, fn, fmt.name)) File "/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/wavefront_obj/__init__.py", line 37, in save_file return obj.write_obj(session, path, models) File "/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/wavefront_obj/obj.py", line 150, in write_obj for d in m.all_drawings(): AttributeError: 'str' object has no attribute 'all_drawings' AttributeError: 'str' object has no attribute 'all_drawings' File "/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/wavefront_obj/obj.py", line 150, in write_obj for d in m.all_drawings(): See log for complete Python traceback. If you wish to report this error, send mail to chimerax-bugs@cgl.ucsf.edu<mailto:chimerax-bugs@cgl.ucsf.edu> and describe what you were doing and include a copy of the contents of the log. ________________________________ --CONFIDENTIALITY NOTICE--: The information contained in this email is intended for the exclusive use of the addressee and may contain confidential information. If you are not the intended recipient, you are hereby notified that any form of dissemination of this communication is strictly prohibited. www.benaroyaresearch.org
Attachments (2)
Change History (10)
comment:1 by , 8 years ago
Component: | Unassigned → Input/Output |
---|---|
Milestone: | → Alpha 3 |
Owner: | set to |
Platform: | → all |
Project: | → ChimeraX |
Status: | new → assigned |
comment:2 by , 8 years ago
I don't any error doing the steps you describe. Can you give me the exact commands that produced this error? I suspect the trouble is with your syntax for the "save" command but I have not figure out a case that would produce your error.
I just added OBJ export at the end of last week. I see it makes enormous files for molecules showing atoms/bonds (300 Mbytes for your example). The "set subdivision" command before saving could reduce the file size.
comment:3 by , 8 years ago
By the way, the OBJ export does not save colors currently, so it may not be useful to you.
follow-up: 4 comment:4 by , 8 years ago
Tom, Here are two screen captures that show the before and after save as Obj command. I started ChimeraX, loaded 1J8H, and saved as Wavefront. I was running on OS X MacBook with software all up to date. Hope this helps. Tom [cid:30D37F11-9840-43A8-9AB4-4CCE7C38FCE6] [cid:0B8FDFCB-B9E0-4DA6-9754-7DDB23486BF2]On Aug 29, 2017, at 12:59 PM, ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu<mailto:ChimeraX-bugs-admin@cgl.ucsf.edu>> wrote: #814: Save .obj error -----------------------------------+---------------------- Reporter: TSkillman@… | Owner: goddard Type: defect | Status: assigned Priority: normal | Milestone: Alpha 3 Component: Input/Output | Version: Resolution: | Keywords: Blocked By: | Blocking: Notify when closed: | Platform: all Project: ChimeraX | -----------------------------------+---------------------- Comment (by goddard): I don't any error doing the steps you describe. Can you give me the exact commands that produced this error? I suspect the trouble is with your syntax for the "save" command but I have not figure out a case that would produce your error. I just added OBJ export at the end of last week. I see it makes enormous files for molecules showing atoms/bonds (300 Mbytes for your example). The "set subdivision" command before saving could reduce the file size. -- Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/814#comment:2> ChimeraX <http://www.rbvi.ucsf.edu/chimerax/> ChimeraX Issue Tracker ________________________________ --CONFIDENTIALITY NOTICE--: The information contained in this email is intended for the exclusive use of the addressee and may contain confidential information. If you are not the intended recipient, you are hereby notified that any form of dissemination of this communication is strictly prohibited. www.benaroyaresearch.org
comment:5 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed.
The File / Save... menu dialog was broken due to some recent changes to the file export APIs. Fixed in tonight's build. The save command is working correctly ("save ~/Desktop/model.obj")
comment:6 by , 8 years ago
Update - Just realized that I can type the save command into the command window. That seems to be working. So the problem is just with using the Save dropdown menu item. ________________________________ --CONFIDENTIALITY NOTICE--: The information contained in this email is intended for the exclusive use of the addressee and may contain confidential information. If you are not the intended recipient, you are hereby notified that any form of dissemination of this communication is strictly prohibited. www.benaroyaresearch.org
comment:7 by , 8 years ago
Our last two messages crossed. Thanks for the fix. -Tom ________________________________ --CONFIDENTIALITY NOTICE--: The information contained in this email is intended for the exclusive use of the addressee and may contain confidential information. If you are not the intended recipient, you are hereby notified that any form of dissemination of this communication is strictly prohibited. www.benaroyaresearch.org
follow-up: 6 comment:8 by , 8 years ago
All working great now. The set subdivision really helps with file size. I’ve been using 0.1 and the model still looks good. Generated a surface, stick, and ribbon models and loaded them into Meshlab without problem. Cool. ________________________________ --CONFIDENTIALITY NOTICE--: The information contained in this email is intended for the exclusive use of the addressee and may contain confidential information. If you are not the intended recipient, you are hereby notified that any form of dissemination of this communication is strictly prohibited. www.benaroyaresearch.org
Reported by Tom Skillman