MacBook air
HerodinSSS opened this issue · 1 comments
It is not working on my MacBook. It says:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/peewee.py", line 3133, in connect
self._state.set_connection(self._connect())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/peewee.py", line 3478, in _connect
conn = sqlite3.connect(self.database, timeout=self._timeout,
sqlite3.OperationalError: unable to open database fileDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/bin/sqlite_web", line 33, in
sys.exit(load_entry_point('sqlite-web==0.4.0', 'console_scripts', 'sqlite_web')())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/sqlite_web/sqlite_web.py", line 870, in main
initialize_app(args[0], options.read_only, password, options.url_prefix,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/sqlite_web/sqlite_web.py", line 837, in initialize_app
dataset = SqliteDataSet('sqlite:///%s' % filename, bare_fields=True)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/playhouse/dataset.py", line 44, in init
self._database.connect(reuse_if_open=True)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/peewee.py", line 3132, in connect
with exception_wrapper:
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/peewee.py", line 2970, in exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/peewee.py", line 191, in reraise
raise value.with_traceback(tb)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/peewee.py", line 3133, in connect
self._state.set_connection(self._connect())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/peewee.py", line 3478, in _connect
conn = sqlite3.connect(self.database, timeout=self._timeout,
peewee.OperationalError: unable to open database file
I am not sure if it me or something else. But when I try to use the >sqlite_web /path/to/database.db it gives me this error message.
Try opening your database file with the standard sqlite3
command - does that work? E.g.
$ sqlite3 /path/to/database.db
Unfortunately this bug is coming from the sqlite3
python driver so there's not much to do, and it almost always indicates an issue with the database file itself.