Jupyter Notebook - sqlite3.DatabaseError

254 views Asked by At

Hello everyone: I am a university student and I regularly work in a jupyter notebook environment, within a WSL system in my computer.

All of a sudden, my jupyter notebook kernel "died" and it refused to start ever since: this is the traceback I get from the terminal.

Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/freddycch/.local/lib/python3.6/site-packages/ipykernel_launcher.py", line 16, in
app.launch_new_instance()
File "/home/freddycch/.local/lib/python3.6/site-packages/traitlets/config/application.py", line 663, in launch_instance
app.initialize(argv)
File "/home/freddycch/.local/lib/python3.6/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw)
File "/home/freddycch/.local/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/home/freddycch/.local/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 589, in initialize
self.init_kernel()
File "/home/freddycch/.local/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 452, in init_kernel
user_ns=self.user_ns,
File "/home/freddycch/.local/lib/python3.6/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/home/freddycch/.local/lib/python3.6/site-packages/ipykernel/ipkernel.py", line 73, in init
kernel = self,
File "/home/freddycch/.local/lib/python3.6/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/home/freddycch/.local/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 661, in init
self.init_history()
File "/home/freddycch/.local/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 1802, in init_history
self.history_manager = HistoryManager(shell=self, parent=self)
File "/home/freddycch/.local/lib/python3.6/site-packages/IPython/core/history.py", line 543, in init
self.new_session()
File "/home/freddycch/.local/lib/python3.6/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw)
File "/home/freddycch/.local/lib/python3.6/site-packages/IPython/core/history.py", line 58, in needs_sqlite
return f(self, *a, **kw)
File "/home/freddycch/.local/lib/python3.6/site-packages/IPython/core/history.py", line 569, in new_session
NULL, "") """, (datetime.datetime.now(),))
sqlite3.DatabaseError: database disk image is malformed

I am a physics student, thus I really don't know what to do in this situation. At this point, I have tried uninstalling and re-installing python, and I went full sudo apt purge to try and reset everything, without great results.

Is anyone able to help me fix this problem? Thank you in advance :D

0

There are 0 answers