I get this error ([Errno 2] No such file or directory) after I push the repo to heroku master. Here are my logs.
2012-04-17T18:24:53+00:00 app[web.1]: python: can't open file '/test/project/manage.py': [Errno 2] No such file or directory
2012-04-17T18:24:54+00:00 heroku[web.1]: Process exited with status 2
2012-04-17T18:24:54+00:00 heroku[web.1]: State changed from starting to crashed
2012-04-17T18:24:54+00:00 heroku[web.1]: State changed from crashed to created
2012-04-17T18:24:54+00:00 heroku[web.1]: State changed from created to starting
2012-04-17T18:24:57+00:00 heroku[web.1]: Starting process with command python /test/project/manage.py runserver 0.0.0.0:4473 --noreload 2012-04-17T18:24:57+00:00 app[web.1]: python: can't open file '/test/project/manage.py': [Errno 2] No such file or directory
My Procfile looks like the following:
web: python /test/project/manage.py runserver 0.0.0.0:$PORT --noreload
I don’t know why it can’t open the file. It opens fine when I am using my development server. Any ideas? Thanks for reading.
Your current setup in your Procfile references an absolute path ‘/test/project/manage.py’ that doesn’t exist on Heroku. The ‘/test/ is the root of the instance you’re running in and is incorrect. You should first change this to be the relative path, this is likely something like:
If this does not work you can explore the location of the project by running:
This should place you in ‘/app’ from here you can see what the path to start your project is.
Since your initial push likely failed to start the process you’ll likely need to scale a web process. You can then do this with: