0

I have searched a lot regarding uploading my django project on heroku but I'm unable to do that. Please check the following structure and let me know what is wrong and why I'm getting this error:

File "/app/djangosample1/settings.py", line 17, in import heroku as heroku ModuleNotFoundError: No module named 'heroku'

Structure of my project:

https://github.com/cabudies/djangosample2-master/blob/master/structure.png

Procfile

web: gunicorn djangosample1.wsgi --log-file-

wsgi.py

import os from django.core.wsgi import get_wsgi_application from whitenoise.django import DjangoWhiteNoise

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangosample1.settings")

application = get_wsgi_application() application = DjangoWhiteNoise(application)

Also, whenever I'm running 'python manage.py runserver' even on local server, I'm getting error:

SyntaxError: invalid syntax at heroku\helpers.py

Gurjas Singh
  • 19
  • 1
  • 6
  • `No module named 'heroku'` means Python can't find the file `heroku.py`. Looking at the image of your project structure I see no file called `heroku.py`. – figbeam Jul 05 '18 at 23:42
  • Do you have `heroku` in your `requirements.txt`? – Selcuk Jul 06 '18 at 00:10
  • @figbeam: I was checking a tutorial on how to deploy python project on heroku and they haven't mentioned anything about heroku.py. Please let me know how to do it. – Gurjas Singh Jul 06 '18 at 11:44
  • I think I may be misunderstanding here. When you import a module Python looks for a file with that name. But it's not that you mean when you mention **heroku**, is it? What do you mean by it? – figbeam Jul 06 '18 at 12:50
  • Googled "heroku". I'm out of my depth here. I thought you were importing a module. – figbeam Jul 06 '18 at 13:00
  • No, "heroku" will be used to deploy my web application. However, I don't know why I'm getting this error. – Gurjas Singh Jul 08 '18 at 12:24

0 Answers0