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)
- Tab completion not working for class when it has property with typing.Literal annotated return value HOT 6
- Broken link in documentation HOT 2
- Infinite redirects on http://nbviewer.ipython.org/ HOT 1
- Optional `compress_dhist()` requires `pickleshare`
- Control + C ignored after loading Rust module built with PyO3/Maturin
- Different behavior when adding virtual environment
- Autocomplete Feature Not Working after Switching Python Version
- JupiterLab matplotlib issue HOT 3
- Allow output to be included in %notebook exported files
- Autoreload slows down over time
- Jupyter NoteBook\ ipynb file not showing In and Out words HOT 2
- Released PyPI versions have tags missing from repo HOT 3
- Crash when trying to show `globals()` (`__repr__ returned non-string`) HOT 3
- How to change `IPython.terminal.shortcuts.newline_autoindent` to 2 extra spaces?
- : documentation build fails with `cannot import name 'system' from 'IPython.utils.process'` error HOT 2
- Translations of ipython core project website HOT 6
- How can i connect to Ipython kernel HOT 1
- memory leakage with matplotlib HOT 1
- Remove upload to archive server and cleanup release too.
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.