sqlite3.OperationalError:导入ipdb时数据库被锁定

2024-05-20 20:45:42 发布

您现在位置:Python中文网/ 问答频道 /正文

当我导入ipdb时,我看到下面的错误消息。在

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

在处理上述异常时,发生了另一个异常:

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


Tags: inpyselfautoinitlibpackagesline
1条回答
网友
1楼 · 发布于 2024-05-20 20:45:42

我看到了ipython 5.1.0版本的python3.3.5上的第一个异常“NameError:name'get_ipython’is not defined”,当我切换到ipython 4.2.1时,它就消失了(检查https://stackoverflow.com/a/39501284/4571444)。在

当时有人问这个问题ipython5.0和4.0都已经发布了(https://ipython.org/news.html)。在

我建议用第一个异常更新主题名,第二个异常可能是由于对第一个异常处理不当造成的。在

相关问题 更多 >