简体   繁体   English

通过uWSGI Emperor启动时Flask看不到sqlite db

[英]Flask can't see sqlite db when launched via uWSGI Emperor

When I run my Flask app via uWSGI emperor, it 502's out with a Sqlite error regarding it not being able to see my tables. 当我通过uWSGI皇帝运行我的Flask应用程序时,由于无法看到我的表,它出现了Sqlite错误502,但出现了Sqlite错误。 I can go in via the sqlite3 command and verify the data is there. 我可以通过sqlite3命令进入并验证数据是否在那里。 When I run the site via 当我通过运行网站时

uwsgi --ini site_conf.ini

it works just fine, but not via emperer. 它工作正常,但不能通过皇帝使用。

Check you are not using relative paths when referring to the sqlite db. 检查引用sqlite db时是否使用了相对路径。 When run by the Emperor the cwd changes to the vassals dir. 由皇帝运行时,cwd更改为附庸国目录。 Eventually use chdir option in your vassal to move to a specific directory 最终在您的附庸国使用chdir选项移动到特定目录

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM