I'm experiencing an sqlite3.OperationalError: attempt to write a readonly database
(stack trace attached). As this seems to be an error related to a database connection, the error message could be more precise (which is my enhancement request), specifying the failed connection parameters (at least host and port). It is not clear what the program expects thought it could be.
stacktrace
Original exception was:
Traceback (most recent call last):
File "/usr/bin/ipython", line 7, in
launch_new_instance()
File "/mnt/DATA/sources/ipython/IPython/frontend/terminal/ipapp.py", line 388, in launch_new_instance
app.initialize()
File "
File "/mnt/DATA/sources/ipython/IPython/config/application.py", line 84, in catch_config_error
return method(app, _args, _kwargs)
File "/mnt/DATA/sources/ipython/IPython/frontend/terminal/ipapp.py", line 324, in initialize
self.init_shell()
File "/mnt/DATA/sources/ipython/IPython/frontend/terminal/ipapp.py", line 340, in init_shell
ipython_dir=self.ipython_dir)
File "/mnt/DATA/sources/ipython/IPython/config/configurable.py", line 318, in instance
inst = cls(_args, *_kwargs)
File "/mnt/DATA/sources/ipython/IPython/frontend/terminal/interactiveshell.py", line 360, in init
user_module=user_module, custom_exceptions=custom_exceptions
File "/mnt/DATA/sources/ipython/IPython/core/interactiveshell.py", line 436, in init
self.init_history()
File "/mnt/DATA/sources/ipython/IPython/core/interactiveshell.py", line 1489, in init_history
self.history_manager = HistoryManager(shell=self, config=self.config)
File "/mnt/DATA/sources/ipython/IPython/core/history.py", line 409, in init
self.new_session()
File "
File "/mnt/DATA/sources/ipython/IPython/core/history.py", line 60, in needs_sqlite
return f(_a,_
File "/mnt/DATA/sources/ipython/IPython/core/history.py", line 427, in new_session
NULL, "") """, (datetime.datetime.now(),))
sqlite3.OperationalError: attempt to write a readonly database
output of python -c "import IPython; print(IPython.sys_info())":
It would be nice to have a possibility to attach files to the issue report and to be able to search the already committed issues (!!).
sqlite uses a file, not a database server. By default, it will be saving in ~/.ipython/profile_default/history.sqlite
. Does that file exist, and is it writable?
Thanks for the hint! The file had the wrong permissions (not writable). I suggest to improve error message/output.
It would be nice to have a possibility to attach files to the issue report
It is common to use gists.
and to be able to search the already committed issues (!!).
The search field is located at the top of the page.
I tried this and it worked. Thank you @takluyver, @richtekp.
~/.ipython/profile_default/history.sqlite
/Users/ChessTastic/.ipython/profile_default/history.sqlite.
➜ profile_default sudo chmod a+w history.sqlite
Password:
Most helpful comment
I tried this and it worked. Thank you @takluyver, @richtekp.