Opened 9 years ago

Closed 9 years ago

#544 closed defect (fixed)

"set bgcolor" seems to have died

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

Description

Now I get a traceback from "set bgcolor" including by clicking the background-color Graphics icons or typing the command directly. Clicking the white-square Graphics icon gives:

set bgColor white
Traceback (most recent call last):
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/shortcuts/tool.py", line 47, in button_press_cb
ks.run_shortcut(keys)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/shortcuts/shortcuts.py", line 373, in run_shortcut
sc.run(self.session)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/shortcuts/shortcuts.py", line 270, in run
commands.run(s, f)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/run.py", line 31, in run
return command.run(text, log=log)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/cli.py", line 2257, in run
result = ci.function(session, kw_args)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/commands/set.py", line 40, in set
view.background_color = bg_color.rgba
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/graphics/view.py", line 262, in set_background_color
color[3] = 0 # For transparent background images.
ValueError: assignment destination is read-only

ValueError: assignment destination is read-only

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/graphics/view.py", line 262, in set_background_color
color[3] = 0 # For transparent background images.
See log for Python traceback.

Change History (1)

comment:1 by Tom Goddard, 9 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Bug introduced yesterday when standard named colors were made immutable (for Tristan Croll). Turned out setting background tried to change an immutable color.

Note: See TracTickets for help on using tickets.