ensure_app_context is called without arguments when importing
Glandos opened this issue · 3 comments
It seems that ensure_app_context
is called on top level of routes.py
.
However, when using the wsgi.py
, the get_app
calls it with arguments, especially to be able to configure data directory. Since it's called without arguments, the following error occurs:
PermissionError: [Errno 13] Permission denied: '/home/www-0bin/.local/share/0bin'
Yes, I need to add some env var reading in WSGI.py. I wasn't expecting people trying the new version so quickly to be honest :)
I haven't even updated the doc yet.
You know, sometimes, you're busy idling, so you're trying to update 😉
I just checked, and we already read from the env vars ZEROBIN_DATA_DIR and ZEROBIN_CONFIG_DIR, so if you desire to use the wsgi file with a user that doesn't have a home directory, you can set those.
I'll add that to the doc, but systemd and mod_wsgi both provide a way to do so.