gunicorn can't start because of 'config' module

Created on 1 Feb 2011  路  2Comments  路  Source: benoitc/gunicorn

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.

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?

Invalid value for variable config in config/clan.cx.py: <module 'config' from '/var/www/clan.cx/src/config.pyc'>

All 2 comments

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

Was this page helpful?
0 / 5 - 0 ratings