ImportError: Could not import settings 'settings.prod' (Is it on sys.path? Is there an import error in the settings file?)
I built this app back in 2013-2014, and it hasn't seen much maintenance since then. But there's a problem now, some AWS keys need to be changed, but I can't deploy the app.
git push heroku master
results in a failed build unless I do
heroku config:set DISABLE_COLLECTSTATIC=0
So, I did that, knowing it would probably break the site, but it never even gets to that point, because then I find out I can't deploy until I upgrade to Cedar-14. Ok, so I do that, then push, and then I get ImportError on every dyno.
app/web.1: ImportError: Could not import settings 'settings.prod' (Is it on sys.path? Is there an import error in the settings file?): cannot import name _uuid_generate_random
app/celerybeat.1: ImportError: Could not import settings 'settings.prod' (Is it on sys.path? Is there an import error in the settings file?): cannot import name _uuid_generate_random
app/celeryd.1: ImportError: Could not import settings 'settings.prod' (Is it on sys.path? Is there an import error in the settings file?): cannot import name _uuid_generate_random
So I read here that I need to update Kombu. Ok, so I do that. Now the same problem, but at the end of the errors, I see this:
cannot import name ResourceError
I've googled, and searched SO, can't find much mention of this error anywhere, and if I add Heroku, I get Zero results. When was the last time a search for an error code returned zero results?
The only thing I can think of is that I'm running a very old version of gunicorn, gunicorn==0.14.6
, but I'm not 100% sure what upgrading will do, what other dependencies I'll need to unfreeze and update, or what the new command I should use in the Heroku Procfile should be, since the gunicorn_django command was deprecated and removed.
Any thought on how best to get this app updated, so I can deploy a simple settings change, would be greatly appreciated.
Here's the Procfile, in case this provides any additional context to the error:
web: gunicorn_django -b 0.0.0.0:$PORT -w 9 -k gevent --max-requests 250 --preload settings.prod
celeryd: python manage.py celeryd -E -B --loglevel=INFO --settings=settings.prod
celerybeat: python manage.py celerybeat -S djcelery.schedulers.DatabaseScheduler --settings=settings.prod