Opened 10 years ago
Closed 10 years ago
#193 closed defect (fixed)
"save" format keyword gives traceback
Reported by: | Elaine Meng | Owned by: | Greg Couch |
---|---|---|---|
Priority: | blocker | Milestone: | |
Component: | Graphics | Version: | |
Keywords: | Cc: | Tom Goddard | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | chimera |
Description
for example, either the following or the following plus the "image" keyword
save ~/Desktop/test format PPM
gives:
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/chimera/cmd_line/gui.py", line 119, in on_enter
cmd = Command(session, cmd_text, final=True)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimera/core/commands/cli.py", line 1715, in init
self.parse_text(text, final=final, _used_aliases=_used_aliases)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimera/core/commands/cli.py", line 2106, in parse_text
self._process_keyword_arguments(final, prev_annos)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimera/core/commands/cli.py", line 2060, in _process_keyword_arguments
value, text = self._parse_arg(anno, text, session, final)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimera/core/commands/cli.py", line 1837, in _parse_arg
value, replacement, rest = annotation.parse(text, session)
File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimera/core/commands/cli.py", line 968, in parse
return self.values[i], ident, rest
TypeError: 'dict_values' object does not support indexing
Modified the EnumOf annotation to take iterators as well as sequences. The bug was that {}.values(), 'dict_values' object, is not a sequence in Python 3.