在本地,我创建了一个名为earthquakes.db
. 使用数据集Python 库,我能够将结果冻结到 json 文件中,并且一切都按预期工作。但是,在部署时,我得到一长串错误,可能是指无法连接到数据库。
Traceback (most recent call last):
File "/var/www/html/apps/earthquakes/scripts/earthquakes.py", line 7, in <module>
db = dataset.connect('sqlite:///earthquakes.db')
... More base.py and pool.py errors here ...
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
我检查了权限和安装,一切似乎都是正确的。我错过了什么?谢谢。