Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
import error in 19.1.0 #836
I've got this error with upgrade to 19.1.0 from 19.0.0.
And gunicorn configuration is:
I think the problem is at https://github.com/benoitc/gunicorn/blob/master/gunicorn/app/base.py#L101
I can reproduce it with the following command:
$ gunicorn -c ../c.py app:app Error: relative imports require the 'package' argument
The error message comes from https://github.com/benoitc/gunicorn/blob/master/gunicorn/util.py#L87
And the related commit is 2bde8eb.
The problem happen here because it try to load a module first for the config and just fail. Imo we rely too much on guess here (if we want to load a module or a patch) and we should probably do it more explicitely. I propose to do the following:
What about using the path separator or the file extension to guess: