Jon Bloom
Jon Bloom

Reputation: 148

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. I can go in via the sqlite3 command and verify the data is there. When I run the site via

uwsgi --ini site_conf.ini

it works just fine, but not via emperer.

Upvotes: 0

Views: 463

Answers (1)

roberto
roberto

Reputation: 12953

Check you are not using relative paths when referring to the sqlite db. When run by the Emperor the cwd changes to the vassals dir. Eventually use chdir option in your vassal to move to a specific directory

Upvotes: 1

Related Questions