I have a 'src' directory with a module 'config'.
When I try to start gunicorn I get:
$ ../env/bin/gunicorn main:application --config config/clan.cx.py
Invalid value for config: <module 'config' from '/var/www/clan.cx/src/config.pyc'>
Error: Not a string: <module 'config' from '/var/www/clan.cx/src/config.pyc'>
(I type this command while in the 'src' directory)
It doesn't change anything if I rename config.py to config/__init__.py
.
Oops, I'm an idiot. I didn't realize that having a 'config' variable in the file 'config/clan.cx.py' would override the 'config' variable of gunicorn...
Maybe a clearer error message would have helped me better?
Invalid value for variable config in config/clan.cx.py: <module 'config' from '/var/www/clan.cx/src/config.pyc'>
import config as conf
it's work
Most helpful comment
Oops, I'm an idiot. I didn't realize that having a 'config' variable in the file 'config/clan.cx.py' would override the 'config' variable of gunicorn...
Maybe a clearer error message would have helped me better?