Opened 8 years ago

Closed 8 years ago

#817 closed defect (fixed)

traceback trying to use texture command

Reported by: Elaine Meng Owned by: Tom Goddard
Priority: major Milestone:
Component: Depiction Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Maybe I misunderstood the usage information, but when I had mol surf #1.2 and tried to map an image onto it (doesn't seem to matter which one), I got this traceback:

texture #1.2 imageFile ~/Pictures/pancake-bunny.jpg coords sphere
Traceback (most recent call last):
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/cmd_line/tool.py", line 177, in execute
cmd.run(cmd_text)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/commands/cli.py", line 2405, in run
result = ci.function(session, kw_args)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/texture/texture.py", line 35, in texture
rgba = None if image_file is None or image_file == 'none' else image_file_as_rgba(image_file)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/texture/texture.py", line 64, in image_file_as_rgba
rgba = qimage_to_numpy(qi)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/graphics/drawing.py", line 1817, in qimage_to_numpy
buf = qi.bits().asstring(qi.byteCount())
AttributeError: 'NoneType' object has no attribute 'asstring'

Change History (1)

comment:1 by Tom Goddard, 8 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Problem was image was not found because command didn't handle "~/" in path. I've made it handle "~/" and also give a sensible error if it cannot find the specified file.

Note: See TracTickets for help on using tickets.