0

The whole project is available in this drive link This projects works perfectly fine when I executed it on my local host When trying to deploy on heroku I get app crashed and when I run (heroku logs -- tail) the following error message was displayed as shown below .

(Note I didnt change the secret key because I felt it wasn't Important in the current state of the project as this is only for the educational/development purpose so please kindly take that into consideration ) . Kindly help !

I have been receiving that this is a similar question from the questions already asked . But the PIL is present in the requirements.txt file as Pillow==7.2.0 there were a few more answers on the same issues and I tried quite a few of them but non worked for me kindly help

2020-08-10T17:58:57.717239+00:00 app[web.1]: [2020-08-10 17:58:57 +0000] [10]
 [ERROR] Exception in worker process    
    2020-08-10T17:58:57.717284+00:00 app[web.1]: Traceback (most recent call last):    
    2020-08-10T17:58:57.717286+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker    
    2020-08-10T17:58:57.717288+00:00 app[web.1]: worker.init_process()    
    2020-08-10T17:58:57.717288+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process    
    2020-08-10T17:58:57.717288+00:00 app[web.1]: self.load_wsgi()
    2020-08-10T17:58:57.717289+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
    2020-08-10T17:58:57.717289+00:00 app[web.1]: self.wsgi = self.app.wsgi()    
    2020-08-10T17:58:57.717291+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi    
    2020-08-10T17:58:57.717291+00:00 app[web.1]: self.callable = self.load()    
    2020-08-10T17:58:57.717291+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load        
    2020-08-10T17:58:57.717291+00:00 app[web.1]: return self.load_wsgiapp()    
    2020-08-10T17:58:57.717292+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp    
    2020-08-10T17:58:57.717292+00:00 app[web.1]: return util.import_app(self.app_uri)    
    2020-08-10T17:58:57.717292+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app    
    2020-08-10T17:58:57.717292+00:00 app[web.1]: mod = importlib.import_module(module)    
    2020-08-10T17:58:57.717292+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
    2020-08-10T17:58:57.717294+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)    
    2020-08-10T17:58:57.717294+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import    
    2020-08-10T17:58:57.717294+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 983, in _find_and_load    
    2020-08-10T17:58:57.717295+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked    
    2020-08-10T17:58:57.717295+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
    2020-08-10T17:58:57.717295+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 728, in exec_module    
    2020-08-10T17:58:57.717295+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed    
    2020-08-10T17:58:57.717295+00:00 app[web.1]: File "/app/Insta/wsgi.py", line 16, in <module>
    2020-08-10T17:58:57.717295+00:00 app[web.1]: application = get_wsgi_application()    
    2020-08-10T17:58:57.717296+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
    2020-08-10T17:58:57.717296+00:00 app[web.1]: django.setup(set_prefix=False)
    2020-08-10T17:58:57.717296+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
    2020-08-10T17:58:57.717296+00:00 app[web.1]: apps.populate(settings.INSTALLED_APPS)    
    2020-08-10T17:58:57.717296+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate    
    2020-08-10T17:58:57.717297+00:00 app[web.1]: app_config.import_models()    
    2020-08-10T17:58:57.717297+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models    
    2020-08-10T17:58:57.717297+00:00 app[web.1]: self.models_module = import_module(models_module_name)    
    2020-08-10T17:58:57.717297+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/importlib/__init__.py", line 127, in import_module    
    2020-08-10T17:58:57.717297+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)    
    2020-08-10T17:58:57.717297+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import    
    2020-08-10T17:58:57.717298+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 983, in _find_and_load    
    2020-08-10T17:58:57.717298+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked    
    2020-08-10T17:58:57.717298+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 677, in _load_unlocked    
    2020-08-10T17:58:57.717298+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 728, in exec_module    
    2020-08-10T17:58:57.717298+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed    
    2020-08-10T17:58:57.717298+00:00 app[web.1]: File "/app/Angram/models.py", line 3, in <module>    
    2020-08-10T17:58:57.717299+00:00 app[web.1]: from PIL import Image    
    2020-08-10T17:58:57.717299+00:00 app[web.1]: ModuleNotFoundError: No module named 'PIL'    
    2020-08-10T17:58:57.717545+00:00 app[web.1]: [2020-08-10 17:58:57 +0000] [10] [INFO] Worker exiting (pid: 10)    
    2020-08-10T17:58:57.731434+00:00 app[web.1]: [2020-08-10 17:58:57 +0000] [11] [ERROR] Exception in worker process    
    2020-08-10T17:58:57.731436+00:00 app[web.1]: Traceback (most recent call last):    
    2020-08-10T17:58:57.731437+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker    
    2020-08-10T17:58:57.731438+00:00 app[web.1]: worker.init_process()    
    2020-08-10T17:58:57.731438+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process    
    2020-08-10T17:58:57.731439+00:00 app[web.1]: self.load_wsgi()
    2020-08-10T17:58:57.731439+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi    
    2020-08-10T17:58:57.731439+00:00 app[web.1]: self.wsgi = self.app.wsgi()    
    2020-08-10T17:58:57.731440+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi    
    2020-08-10T17:58:57.731440+00:00 app[web.1]: self.callable = self.load()    
    2020-08-10T17:58:57.731441+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load    
    2020-08-10T17:58:57.731441+00:00 app[web.1]: return self.load_wsgiapp()    
    2020-08-10T17:58:57.731441+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp    
    2020-08-10T17:58:57.731442+00:00 app[web.1]: return util.import_app(self.app_uri)    
    2020-08-10T17:58:57.731448+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
    2020-08-10T17:58:57.731449+00:00 app[web.1]: mod = importlib.import_module(module)    
    2020-08-10T17:58:57.731449+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/importlib/__init__.py", line 127, in import_module    
    2020-08-10T17:58:57.731450+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)    
    2020-08-10T17:58:57.731450+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import    
    2020-08-10T17:58:57.731451+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 983, in _find_and_load    
    2020-08-10T17:58:57.731451+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked    
    2020-08-10T17:58:57.731452+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 677, in _load_unlocked    
    2020-08-10T17:58:57.731452+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 728, in exec_module    
    2020-08-10T17:58:57.731452+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed    
    2020-08-10T17:58:57.731453+00:00 app[web.1]: File "/app/Insta/wsgi.py", line 16, in <module>    
    2020-08-10T17:58:57.731453+00:00 app[web.1]: application = get_wsgi_application()    
    2020-08-10T17:58:57.731454+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application    
    2020-08-10T17:58:57.731454+00:00 app[web.1]: django.setup(set_prefix=False)    
    2020-08-10T17:58:57.731454+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/django/__init__.py", line 24, in setup    
    2020-08-10T17:58:57.731454+00:00 app[web.1]: apps.populate(settings.INSTALLED_APPS)    
    2020-08-10T17:58:57.731455+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate    
    2020-08-10T17:58:57.731455+00:00 app[web.1]: app_config.import_models()    
    2020-08-10T17:58:57.731455+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models    
    2020-08-10T17:58:57.731456+00:00 app[web.1]: self.models_module = import_module(models_module_name)    
    2020-08-10T17:58:57.731456+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/importlib/__init__.py", line 127, in import_module    
    2020-08-10T17:58:57.731456+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level)    
    2020-08-10T17:58:57.731457+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import    
    2020-08-10T17:58:57.731457+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 983, in _find_and_load    
    2020-08-10T17:58:57.731457+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked    
    2020-08-10T17:58:57.731457+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 677, in _load_unlocked    
    2020-08-10T17:58:57.731462+00:00 app[web.1]: File "<frozen importlib._bootstrap_external>", line 728, in exec_module    
    2020-08-10T17:58:57.731462+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed    
    2020-08-10T17:58:57.731463+00:00 app[web.1]: File "/app/Angram/models.py", line 3, in <module>    
    2020-08-10T17:58:57.731463+00:00 app[web.1]: from PIL import Image    
    2020-08-10T17:58:57.731463+00:00 app[web.1]: ModuleNotFoundError: No module named 'PIL'
    2020-08-10T17:58:57.731730+00:00 app[web.1]: [2020-08-10 17:58:57 +0000] [11] [INFO] Worker exiting (pid: 11)    
    2020-08-10T17:58:57.951050+00:00 app[web.1]: [2020-08-10 17:58:57 +0000] [4] [INFO] Shutting down: Master    
    2020-08-10T17:58:57.951171+00:00 app[web.1]: [2020-08-10 17:58:57 +0000] [4] [INFO] Reason: Worker failed to boot.    
    2020-08-10T17:58:58.069837+00:00 heroku[web.1]: Process exited with status 3    
    2020-08-10T17:58:58.110789+00:00 heroku[web.1]: State changed from up to crashed    
    2020-08-10T17:59:03.486724+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/login" host=anuraginstaclone.herokuapp.com request_id=faa21159-9450-4bc9-82e4-68930207196a fwd="60.243.148.124" dyno=web.1 connect=5000ms service= status=503 bytes= protocol=https    
    2020-08-10T17:59:03.816920+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=anuraginstaclone.herokuapp.com request_id=9ae26860-abd6-4944-82a3-397069c8b532 fwd="60.243.148.124" dyno= connect= service= status=503 bytes= protocol=https    
    2020-08-10T17:59:21.706244+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=anuraginstaclone.herokuapp.com request_id=a5412cbc-48e5-4ec9-b755-f70286ac3e48 fwd="60.243.148.124" dyno= connect= service= status=503 bytes= protocol=https    
    2020-08-10T17:59:22.043910+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=anuraginstaclone.herokuapp.com request_id=37a20a82-b237-4f75-9b9d-4eda8b4b338f fwd="60.243.148.124" dyno= connect= service= status=503 bytes= protocol=https**
  • "ModuleNotFoundError: No module named 'PIL'"—do you have `PIL` or `pillow` defined as a requirement? – ChrisGPT was on strike Aug 10 '20 at 21:18
  • Does this answer your question? [Requests works locally but not deployed on Heroku](https://stackoverflow.com/questions/61669769/requests-works-locally-but-not-deployed-on-heroku) – ChrisGPT was on strike Aug 10 '20 at 21:27
  • There's a whole pile of things you have to do to get PIL working right on heroku. It took me at least 5-10 pushes to get it all working right. Once I got the Aptfile buildpack going I think I was able to hammer it out. https://stackoverflow.com/questions/25179774/installing-pil-on-heroku-instance and https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-apt – Mike Sandford Aug 10 '20 at 22:41
  • @MikeSandford would please mind explaining in detail sir . I am beginner so it's hard for me to understand – Anurag Sajja Aug 10 '20 at 22:59
  • @Chris Pillow == 7.2.0 is present in the requirements.txt file yet there is an error sir. – Anurag Sajja Aug 10 '20 at 23:06
  • Please [edit] your question and show us the build log. – ChrisGPT was on strike Aug 10 '20 at 23:54

0 Answers0