Opened 7 years ago
Closed 6 years ago
#1802 closed defect (fixed)
Python shell: tab completion produces "KeyError: 'matches' " after failed import
Reported by: | Owned by: | Conrad Huang | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | General Controls | Version: | |
Keywords: | Cc: | pett, Tom Goddard | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The following bug report has been submitted: Platform: Linux-3.10.0-957.5.1.el7.x86_64-x86_64-with-centos-7.6.1810-Core ChimeraX Version: 0.9 (2019-03-25) Description - open shell - attempt to import a non-existent package, e.g. from chimerax import a ImportError: cannot import name 'a' from 'chimerax' (unknown location) After this, trying to tab-complete an import statement in the shell gives this traceback. Log: UCSF ChimeraX version: 0.9 (2019-03-25) © 2016-2019 Regents of the University of California. All rights reserved. How to cite UCSF ChimeraX > toolshed show Shell /opt/UCSF/ChimeraX-daily/lib/python3.7/site- packages/IPython/core/history.py:226: UserWarning: IPython History requires SQLite, your history will not be saved warn("IPython History requires SQLite, your history will not be saved") Traceback (most recent call last): File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site- packages/qtconsole/base_frontend_mixin.py", line 138, in _dispatch handler(msg) File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site- packages/qtconsole/jupyter_widget.py", line 152, in _handle_complete_reply matches = content['matches'] KeyError: 'matches' KeyError: 'matches' File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site- packages/qtconsole/jupyter_widget.py", line 152, in _handle_complete_reply matches = content['matches'] See log for complete Python traceback. OpenGL version: 3.3.0 NVIDIA 415.27 OpenGL renderer: TITAN Xp/PCIe/SSE2 OpenGL vendor: NVIDIA Corporation
Change History (7)
comment:1 by , 7 years ago
Platform: | → all |
---|---|
Project: | → ChimeraX |
comment:3 by , 7 years ago
Cc: | added |
---|---|
Component: | Unassigned → General Controls |
Owner: | set to |
Status: | new → assigned |
Summary: | ChimeraX bug report submission → Python shell: tab completion produces "KeyError: 'matches' " after failed import |
Last Saturday Conrad went to newer versions of ipykernel and ipython (4.9.0→5.1.0 and 6.5.0→7.4.0 respectively), which had fixes for the problems reported in #1370 and #1386, but apparently suffers from the problem reported in this ticket. As per https://github.com/jupyter/qtconsole/issues/318, this problem may be fixed in ipykernel 5.1.1, so we should try that as soon as it is available.
comment:4 by , 7 years ago
Cc: | added |
---|---|
Priority: | normal → major |
comment:6 by , 7 years ago
In the daily build from a few days ago, any error in the Python shell completely broke the shell, all subsequent statements giving "Execution error" as noted in ticket #1802.
comment:7 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
ipykernel 5.1.1 was released and the problem appears fixed. Errors no longer completely breaks the shell and tab completion seems to work.
More: if I attempt to run *any* command after this I get
ERROR: Execution aborted
. On quitting ChimeraX, the following lines get written to stderr:Pretty sure this has happened before, in an old ticket?