2
votes

When I import ipdb, I seen below error message.

import ipdb Traceback (most recent call last): File "/auto/xr_pi/PRODUCTION/pyATS/lib/python3.4/site-packages/ipdb/main.py", line 32, in get_ipython NameError: name 'get_ipython' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/auto/xr_pi/PRODUCTION/pyATS/lib/python3.4/site-packages/ipdb/init.py", line 16, in from ipdb.main import set_trace, post_mortem, pm, run, runcall, runeval, launch_ipdb_on_exception File "/auto/xr_pi/PRODUCTION/pyATS/lib/python3.4/site-packages/ipdb/main.py", line 51, in ipshell = InteractiveShellEmbed() File "/auto/xr_pi/PRODUCTION/pyATS/lib/python3.4/site-packages/IPython/terminal/embed.py", line 68, in init super(InteractiveShellEmbed,self).init(**kw) File "/auto/xr_pi/PRODUCTION/pyATS/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 513, in init self.init_history() File "/auto/xr_pi/PRODUCTION/pyATS/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 1636, in init_history self.history_manager = HistoryManager(shell=self, parent=self) File "/auto/xr_pi/PRODUCTION/pyATS/lib/python3.4/site-packages/IPython/core/history.py", line 520, in init self.new_session() File "", line 2, in new_session File "/auto/xr_pi/PRODUCTION/pyATS/lib/python3.4/site-packages/IPython/core/history.py", line 68, in needs_sqlite return f(self, *a, **kw) File "/auto/xr_pi/PRODUCTION/pyATS/lib/python3.4/site-packages/IPython/core/history.py", line 538, in new_session NULL, "") """, (datetime.datetime.now(),)) sqlite3.OperationalError: database is locked

1
Welcome to SO! Could it be, that you have already the database open somewhere inside the program or even an open cursor? If not, is there an other program still running accessing the db? - Juergen

1 Answers

0
votes

I've seen the first exception "NameError: name 'get_ipython' is not defined" on Python 3.3.5 with IPython 5.1.0, it was gone when I switched to IPython 4.2.1 (check https://stackoverflow.com/a/39501284/4571444).

At the time the question was asked both IPython 5.0 and 4.0 were already released (https://ipython.org/news.html).

I'd suggest the topic name to be updated with the first exception, the second is might be caused by inproper handling of the first.