Comments (5)
IPython 5.10.0
Can you reproduce this using a modern version of IPython? I suspect it is unlikely that a patch would be backported so far back, the current version is 8.24 and there has been a complete refactor of the completer in 8.x series
from ipython.
- Python 3.9.19
- IPython 8.18.1
docker run --rm -it --entrypoint=bash python:3.9
rm /usr/local/lib/python3.*/lib-dynload/_gdbm.cpython*.so
python -m pip install six
python3 -m pip install IPython~=8.0
ipython
shows this, though IPython process does not crash
In [1]: import six.moves.a[TAB]
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/IPython/core/completer.py", line 3171, in _complete
result = matcher(context)
File "/usr/local/lib/python3.9/site-packages/IPython/core/completer.py", line 2707, in custom_completer_matcher
matches = self.dispatch_custom_completer(context.token) or []
File "/usr/local/lib/python3.9/site-packages/IPython/core/completer.py", line 2747, in dispatch_custom_completer
res = c(event)
File "/usr/local/lib/python3.9/site-packages/IPython/core/completerlib.py", line 276, in module_completer
return module_completion(event.line)
File "/usr/local/lib/python3.9/site-packages/IPython/core/completerlib.py", line 253, in module_completion
completion_list = try_import('.'.join(mod[:-1]), True)
File "/usr/local/lib/python3.9/site-packages/IPython/core/completerlib.py", line 186, in try_import
completions.extend( [attr for attr in dir(m) if
File "/usr/local/lib/python3.9/site-packages/IPython/core/completerlib.py", line 187, in <listcomp>
is_importable(m, attr, only_modules)])
File "/usr/local/lib/python3.9/site-packages/IPython/core/completerlib.py", line 156, in is_importable
return inspect.ismodule(getattr(module, attr))
File "/usr/local/lib/python3.9/site-packages/six.py", line 97, in __get__
result = self._resolve()
File "/usr/local/lib/python3.9/site-packages/six.py", line 120, in _resolve
return _import_module(self.mod)
File "/usr/local/lib/python3.9/site-packages/six.py", line 87, in _import_module
__import__(name)
File "/usr/local/lib/python3.9/dbm/gnu.py", line 3, in <module>
from _gdbm import *
ModuleNotFoundError: No module named '_gdbm'
If you suspect this is an IPython 8.18.1 bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at [email protected]
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
from ipython.
Adding a catch for ModuleNotFoundError
around inspect.ismodule
call sounds reasonable to me, but then if reproducer involves deleting shared library from file disk I am not sure if this is really a bug or just a problem with the Python installation?
from ipython.
@krassowski gdbm (and tk) are optional packages
. Not directly reproducible in python3 docker images but easily reproducible with ubuntu/debian not installing python3-gdbm
. (Especially gdbm being GPL)
from ipython.
notifying @felixvd and @hemangandhi as our system does not install python-gdbm
from ipython.
Related Issues (20)
- The autoreload module is not an IPython extension. HOT 1
- Bug with PySide 6.7.2
- Could it be worthy to make `VerboseTB._tb_highlight_style` a public attribute? HOT 1
- `display` does not honor custom `__repr__` for `NamedTuple` when defined by `partialmethod` HOT 1
- wrong redirect?
- Completion in indented lines incorrectly strips the prefix when jedi is disabled HOT 4
- Bug: %%timeit silently throws out duration of first code execution HOT 1
- Comment line executes loop if the previous line is an f-string?
- Adding alt text to images from text embedded in image metadata
- Bug with autocall
- Unexpected AssertionError for undefined symbols on CPython 3.13
- [Duplicate] %run ignores -n switch when running .ipynb files
- comma before function calls function instead of raising syntax error HOT 2
- Do not use mixed units in timeit output HOT 2
- Issues Integrating CustomTkinter HOT 1
- UltraTB module recommends a traceback mode that is not valid HOT 1
- Jupyer in VScode using unwritable folder for .ipython HOT 1
- Down arrow should go to next item in history after previous search
- %load fails to deindent when empty lines are in between multiple indented lines
- Only create the `README_STARTUP` file the first time the `startup_dir` is created HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipython.