[Jupyter notebook] jupyter notebook /.ipynb can not open the file can not be opened nor new [sqlite3 OperationalError:. Database is locked]

jupyter notebook .ipynb file can not be opened, nor the new .ipynb file, an error is [sqlite3 OperationalError:. database is locked]

Troubleshoot.

Turn off the notebook, then the terminal re-open a new notebook, see the terminal screen printed traceback, find the nearest relevant file path is ... xx / nbformat / sign.py file.


 

Prior to this error, there have been notebook Caton, gradually open question, and the error [OsError: Too many open files]
Along the way, first ulimit view open files -n value is 1024, but changed after 2048 and automatically restore the default values.
Then try to restart jupyter notebook, found to interact with the page open, but not open the file, and reported an unknown error? ? ?
So, restart the program or expand the use of file handles did not solve the problem.


 

At this point, it appears when you open a new file error [sqlite3, operationaleeror: database is locked]
a search of all Chinese blog, failed to find a solution, then consider reloading, and then uninstall goose jupyter in any case not clean, only jupyter notebook simply reloading a bit, it does not solve the problem.


 

[Focus]

English began to try to retrieve the problem, finally! I found the same problem ...... o (╥﹏╥) o at issue in the jupyter github project
[posted address: https://github.com/jupyter/nbformat/issues/52 ]
[jupyter-notebook's doc documentation: https://jupyter-notebook.readthedocs.io/en/latest/config.html ]
according to this post, on the whole, this problem is based on jupyter notebook installed on the NFS, look down and found a signature file about (nbsignatures.db, I do not know specifically what looks like a notebook stored signature sqlite file). At this point, it was suggested to remove the history file, rename the file so it was a meter but also helpful.
Finally, I find advice on a problem worked: that change your .jupyter / jupyter_notebook_config.py file (configuration file that is installed jupyter).


 

[] Concrete steps to solve

Into the hidden files .jupyter find jupyter_notebook_config.py file;

File keep looking to find a line c.NotebookNotary.db_file = ''

Can read comments written here is where the notebook is stored signature file, the default value '' may be used ': memory:' to close sqlite write to the file system.
then,

vi config // document editing 
c.NotebookNotary.db_file = ' : Memory: '  // then: wq save and exit

After that, restart the notebook

jupyter notebook

Open the page, successfully opened ipynb file, back to normal.

 

Finally, close the temporary notebook, reopen the notebook running in the background.

nohup jupyter notebook &

 

the above.

problem solved.

Guess you like

Origin www.cnblogs.com/anno-ymy/p/12534305.html