uwsgi-docs
uwsgi-docs copied to clipboard
Need info about the "unable to load configuration from..." message
Please add an explanation of the significance of the "unable to load configuration from..." startup message. I just burned most of a day on this problem and only figured it out after reading the uwsgi source code. In my case, I'm working on an inherited project that used uwsgi 0.9.9.1, and the developer called the config file project.wsgi. Trying to run uwsgi 2.0.12 with that config file gave me this message but no reason as to why the configuration file could not be loaded. It turns out that uwsgi uses the filename extension to try to deduce what kind of file it is if the file type switch (e.g. --ini, --xml, etc.) is not specified, and my file name didn't fit any of the known types. Searching for the message only turned up other people as perplexed as I was, with no solution.
I would like to suggest a note in section https://uwsgi-docs.readthedocs.org/en/latest/Configuration.html#loading-configuration-files that reads something like this:
If the configuration file type is not specified in the parameter list (e.g. --ini, --xml, etc.), uwsgi tries to deduce the file type from the filename extension. If the extension is not a supported file type, uwsgi displays the message "unable to load configuration from..." and exits.
AFAIK the default format if you don't specify it is ini
. If you have any suggestion feel free to open a pull request. Thanks.
@bajhn Just wanted to let you know that you probably saved me a ton of time. I'm using 2.0.17 and was for some reason trying to pass a config file (in ini format) like this:
-c myfile.conf
And I was getting the same unhelpful error. Using --ini
or myfile.ini
helped make it work. I would not have thought to try that without your comment.
Yep, specifying --ini
saved the day, thanks all!
Thanks, you save my day
您的邮件我已收到,我将会尽快给您回复信息。