chamkank / flask-chatterbot

Simple boilerplate for ChatterBot using Flask
377 stars 263 forks source link

Application error on heroku #27

Closed dish34 closed 4 years ago

dish34 commented 4 years ago

When I deployed flask chatterbot app to heroku it was working fine then after some time an application error came.

chamkank commented 4 years ago

Hi there!

Do you mind posting the error log containing the application error? You can fetch it by following these instructions.

dish34 commented 4 years ago

2020-02-12T13:33:50.536408+00:00 app[web.1]: [2020-02-12 13:33:50 +0000] [10] [INFO] Booting worker with pid: 10
2020-02-12T13:33:50.553406+00:00 app[web.1]: [2020-02-12 13:33:50 +0000] [11] [INFO] Booting worker with pid: 11
2020-02-12T13:33:52.048896+00:00 heroku[web.1]: State changed from starting to up 2020-02-12T13:33:51.981025+00:00 app[web.1]: [nltk_data] Downloading package stopwords to /app/nltk_data... 2020-02-12T13:33:51.991750+00:00 app[web.1]: [nltk_data]
Unzipping corpora/stopwords.zip. 2020-02-12T13:33:52.002201+00:00 app[web.1]: [nltk_data] Downloading package averaged_perceptron_tagger to 2020-02-12T13:33:52.002214+00:00 app[web.1]: [nltk_data]
/app/nltk_data... 2020-02-12T13:33:52.132708+00:00 app[web.1]: [nltk_data]
Unzipping taggers/averaged_perceptron_tagger.zip.
2020-02-12T13:33:52.195958+00:00 app[web.1]: [nltk_data] Downloading package stopwords to /app/nltk_data... 2020-02-12T13:33:52.197297+00:00 app[web.1]: [nltk_data]
Package stopwords is already up-to-date! 2020-02-12T13:33:52.198492+00:00 app[web.1]: [nltk_data] Downloading package averaged_perceptron_tagger to 2020-02-12T13:33:52.200547+00:00 app[web.1]: [nltk_data]
/app/nltk_data... 2020-02-12T13:33:52.237664+00:00 app[web.1]: [nltk_data] Downloading package wordnet to /app/nltk_data... 2020-02-12T13:33:52.304402+00:00 app[web.1]: [nltk_data]
Unzipping taggers/averaged_perceptron_tagger.zip.
2020-02-12T13:33:52.390499+00:00 app[web.1]: [2020-02-12 13:33:52 +0000] [10] [ERROR] Exception in worker process
2020-02-12T13:33:52.390502+00:00 app[web.1]: Traceback (most recent call last): 2020-02-12T13:33:52.390511+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/utils.py", line 108, in nltk_download_corpus 2020-02-12T13:33:52.390512+00:00 app[web.1]: find(resource_path) 2020-02-12T13:33:52.390512+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/data.py", line 673, in find 2020-02-12T13:33:52.390513+00:00 app[web.1]: return find(modified_name, paths) 2020-02-12T13:33:52.390513+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/data.py", line 660, in find 2020-02-12T13:33:52.390513+00:00 app[web.1]: return ZipFilePathPointer(p, zipentry) 2020-02-12T13:33:52.390514+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/compat.py", line 228, in _decorator 2020-02-12T13:33:52.390514+00:00 app[web.1]: return init_func(*args, *kwargs) 2020-02-12T13:33:52.390514+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/data.py", line 506, in init 2020-02-12T13:33:52.390515+00:00 app[web.1]: zipfile = OpenOnDemandZipFile(os.path.abspath(zipfile)) 2020-02-12T13:33:52.390516+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/compat.py", line 228, in _decorator 2020-02-12T13:33:52.390517+00:00 app[web.1]: return init_func(args, **kwargs) 2020-02-12T13:33:52.390517+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/data.py", line 1055, in init 2020-02-12T13:33:52.390517+00:00 app[web.1]: zipfile.ZipFile.init(self, filename) 2020-02-12T13:33:52.390518+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/zipfile.py", line 1131, in init 2020-02-12T13:33:52.390518+00:00 app[web.1]: self._RealGetContents() 2020-02-12T13:33:52.390519+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/zipfile.py", line 1198, in _RealGetContents 2020-02-12T13:33:52.390519+00:00 app[web.1]: raise BadZipFile("File is not a zip file") 2020-02-12T13:33:52.390520+00:00 app[web.1]: zipfile.BadZipFile: File is not a zip file 2020-02-12T13:33:52.390520+00:00 app[web.1]: 2020-02-12T13:33:52.390520+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2020-02-12T13:33:52.390521+00:00 app[web.1]: 2020-02-12T13:33:52.390521+00:00 app[web.1]: Traceback (most recent call last): 2020-02-12T13:33:52.390522+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker 2020-02-12T13:33:52.390522+00:00 app[web.1]: worker.init_process() 2020-02-12T13:33:52.390522+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 119, in init_process 2020-02-12T13:33:52.390523+00:00 app[web.1]: self.load_wsgi() 2020-02-12T13:33:52.390523+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi 2020-02-12T13:33:52.390524+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2020-02-12T13:33:52.390524+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi 2020-02-12T13:33:52.390524+00:00 app[web.1]: self.callable = self.load() 2020-02-12T13:33:52.390525+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load 2020-02-12T13:33:52.390525+00:00 app[web.1]: return self.load_wsgiapp() 2020-02-12T13:33:52.390525+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp 2020-02-12T13:33:52.390525+00:00 app[web.1]: return util.import_app(self.app_uri) 2020-02-12T13:33:52.390526+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 358, in import_app 2020-02-12T13:33:52.390526+00:00 app[web.1]: mod = importlib.import_module(module) 2020-02-12T13:33:52.390526+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/importlib/init.py", line 126, in import_module 2020-02-12T13:33:52.390527+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level) 2020-02-12T13:33:52.390527+00:00 app[web.1]: File "", line 994, in _gcd_import 2020-02-12T13:33:52.390527+00:00 app[web.1]: File "", line 971, in _find_and_load
2020-02-12T13:33:52.390528+00:00 app[web.1]: File "", line 955, in _find_and_load_unlocked 2020-02-12T13:33:52.390528+00:00 app[web.1]: File "", line 665, in _load_unlocked
2020-02-12T13:33:52.390529+00:00 app[web.1]: File "", line 678, in exec_module2020-02-12T13:33:52.390529+00:00 app[web.1]: File "", line 219, in _call_with_frames_removed 2020-02-12T13:33:52.390529+00:00 app[web.1]: File "/app/app.py", line 11, in 2020-02-12T13:33:52.390530+00:00 app[web.1]: "chatterbot.logic.BestMatch" 2020-02-12T13:33:52.390530+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/chatterbot.py", line 58, in init 2020-02-12T13:33:52.390530+00:00 app[web.1]: self.initialize() 2020-02-12T13:33:52.390531+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/chatterbot.py", line 80, in initialize 2020-02-12T13:33:52.390531+00:00 app[web.1]: function() 2020-02-12T13:33:52.390532+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/utils.py", line 197, in download_nltk_wordnet 2020-02-12T13:33:52.390532+00:00 app[web.1]: nltk_download_corpus('corpora/wordnet') 2020-02-12T13:33:52.390533+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/utils.py", line 114, in nltk_download_corpus 2020-02-12T13:33:52.390533+00:00 app[web.1]: 'The NLTK corpus file being opened is not a zipfile, ' 2020-02-12T13:33:52.390534+00:00 app[web.1]: zipfile.BadZipFile: The NLTK corpus file being opened is not a zipfile, or it has been corrupted and needs to be manually deleted. 2020-02-12T13:33:52.391418+00:00 app[web.1]: [2020-02-12 13:33:52 +0000] [10] [INFO] Worker exiting (pid: 10)
2020-02-12T13:33:52.599680+00:00 app[web.1]: [nltk_data]
Unzipping corpora/wordnet.zip. 2020-02-12T13:33:57.715841+00:00 app[web.1]: 2020-02-12T13:33:57.789929+00:00 app[web.1]: 2020-02-12T13:33:57.820785+00:00 app[web.1]: 2020-02-12T13:33:57.843267+00:00 app[web.1]: 2020-02-12T13:33:57.872111+00:00 app[web.1]: 2020-02-12T13:33:57.958764+00:00 app[web.1]: 2020-02-12T13:33:58.032303+00:00 app[web.1]: 2020-02-12T13:33:58.180185+00:00 app[web.1]: 2020-02-12T13:33:58.247199+00:00 app[web.1]: 2020-02-12T13:33:58.293042+00:00 app[web.1]: 2020-02-12T13:33:58.317814+00:00 app[web.1]: 2020-02-12T13:33:58.339872+00:00 app[web.1]: 2020-02-12T13:33:58.360106+00:00 app[web.1]: 2020-02-12T13:33:58.378999+00:00 app[web.1]: 2020-02-12T13:33:58.399211+00:00 app[web.1]: 2020-02-12T13:33:58.416232+00:00 app[web.1]: 2020-02-12T13:33:58.427296+00:00 app[web.1]: [2020-02-12 13:33:58 +0000] [11] [INFO] Worker exiting (pid: 11)
2020-02-12T13:33:58.778959+00:00 app[web.1]: [2020-02-12 13:33:58 +0000] [4] [INFO] Shutting down: Master 2020-02-12T13:33:58.779054+00:00 app[web.1]: [2020-02-12 13:33:58 +0000] [4] [INFO] Reason: Worker failed to boot.
2020-02-12T13:33:58.876491+00:00 heroku[web.1]: State changed from up to crashed 2020-02-12T13:33:58.859930+00:00 heroku[web.1]: Process exited with status 3 2020-02-12T13:45:31.111067+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=3e7301fc-91d4-4704-a0d1-ce03706c97f7 fwd="59.94.175.194" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T13:45:33.897918+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=0324c9e6-5087-4683-beb7-7d548f02a2d7 fwd="59.94.175.194" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T13:45:37.466407+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=alphabot2.herokuapp.com request_id=06286273-507a-4eab-900d-f0172e15aec8 fwd="59.94.175.194" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T13:48:36.342468+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=8ba604b1-6dda-40d9-b817-f62b47c5c6e1 fwd="59.94.175.194" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T13:48:39.318739+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=alphabot2.herokuapp.com request_id=65f26f3f-bcca-43a3-bb98-201f25061834 fwd="59.94.175.194" dyno= connect= service= status=503 bytes= protocol=https

dish34 commented 4 years ago

it's working now. I added a nltk.txt file with: wordnet stopwords punkt vader_lexicon thanks @chamkank

dish34 commented 4 years ago

Application error occurred again. Please check.

2020-02-12T17:04:12.566050+00:00 app[web.1]: Traceback (most recent call last): 2020-02-12T17:04:12.566051+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker 2020-02-12T17:04:12.566052+00:00 app[web.1]: worker.init_process() 2020-02-12T17:04:12.566052+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 119, in init_process 2020-02-12T17:04:12.566054+00:00 app[web.1]: self.load_wsgi() 2020-02-12T17:04:12.566055+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi 2020-02-12T17:04:12.566055+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2020-02-12T17:04:12.566056+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi 2020-02-12T17:04:12.566056+00:00 app[web.1]: self.callable = self.load() 2020-02-12T17:04:12.566057+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load 2020-02-12T17:04:12.566057+00:00 app[web.1]: return self.load_wsgiapp() 2020-02-12T17:04:12.566058+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp 2020-02-12T17:04:12.566058+00:00 app[web.1]: return util.import_app(self.app_uri) 2020-02-12T17:04:12.566058+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 358, in import_app 2020-02-12T17:04:12.566059+00:00 app[web.1]: mod = importlib.import_module(module) 2020-02-12T17:04:12.566059+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/importlib/init.py", line 126, in import_module 2020-02-12T17:04:12.566060+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level) 2020-02-12T17:04:12.566060+00:00 app[web.1]: File "", line 994, in _gcd_import 2020-02-12T17:04:12.566060+00:00 app[web.1]: File "", line 971, in _find_and_load
2020-02-12T17:04:12.566061+00:00 app[web.1]: File "", line 955, in _find_and_load_unlocked 2020-02-12T17:04:12.566061+00:00 app[web.1]: File "", line 665, in _load_unlocked
2020-02-12T17:04:12.566061+00:00 app[web.1]: File "", line 678, in exec_module2020-02-12T17:04:12.566062+00:00 app[web.1]: File "", line 219, in _call_with_frames_removed 2020-02-12T17:04:12.566062+00:00 app[web.1]: File "/app/app.py", line 87, in 2020-02-12T17:04:12.566072+00:00 app[web.1]: "Hi", "Hi there, how can I help?", "hi", "Hi there, how can I help?","How are you", "Hi there, how can I help?", "Is anyone there?", "Hi there, how can I help?", "Hello", "Hi there, how can I help?", "Good day", "Hi there, how can I help?", "Whats up", "Hi there, how can I help?","good morning", "Hi there, how can I help?","good afternoon", "Hi there, how can I help?","hey", "Hi there, how can I help?" 2020-02-12T17:04:12.566072+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/trainers.py", line 103, in train 2020-02-12T17:04:12.566073+00:00 app[web.1]: statement_search_text = self.chatbot.storage.tagger.get_bigram_pair_string(text) 2020-02-12T17:04:12.566075+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/tagging.py", line 170, in get_bigram_pair_string 2020-02-12T17:04:12.566076+00:00 app[web.1]: pos_tags.extend(self.get_pos_tags(words)) 2020-02-12T17:04:12.566076+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/tagging.py", line 109, in get_pos_tags 2020-02-12T17:04:12.566077+00:00 app[web.1]: tags = pos_tag(words, lang=self.language.ISO_639) 2020-02-12T17:04:12.566077+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/tag/init.py", line 161, in pos_tag 2020-02-12T17:04:12.566078+00:00 app[web.1]: tagger = _get_tagger(lang) 2020-02-12T17:04:12.566084+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/tag/init.py", line 107, in _get_tagger 2020-02-12T17:04:12.566085+00:00 app[web.1]: tagger = PerceptronTagger() 2020-02-12T17:04:12.566085+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/tag/perceptron.py", line 164, in init 2020-02-12T17:04:12.566086+00:00 app[web.1]: self.load(AP_MODEL_LOC) 2020-02-12T17:04:12.566086+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/tag/perceptron.py", line 245, in load 2020-02-12T17:04:12.566086+00:00 app[web.1]: self.model.weights, self.tagdict, self.classes = load(loc) 2020-02-12T17:04:12.566087+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/data.py", line 873, in load 2020-02-12T17:04:12.566087+00:00 app[web.1]: resource_val = pickle.load(opened_resource) 2020-02-12T17:04:12.566094+00:00 app[web.1]: _pickle.UnpicklingError: pickle data was truncated 2020-02-12T17:04:12.567147+00:00 app[web.1]: [2020-02-12 17:04:12 +0000] [10] [INFO] Worker exiting (pid: 10) 2020-02-12T17:04:17.151478+00:00 app[web.1]: 2020-02-12T17:04:17.221626+00:00 app[web.1]: 2020-02-12T17:04:17.250246+00:00 app[web.1]: 2020-02-12T17:04:17.273286+00:00 app[web.1]: 2020-02-12T17:04:17.292286+00:00 app[web.1]: 2020-02-12T17:04:17.377334+00:00 app[web.1]: 2020-02-12T17:04:17.424685+00:00 app[web.1]: 2020-02-12T17:04:17.531094+00:00 app[web.1]: 2020-02-12T17:04:17.592314+00:00 app[web.1]: 2020-02-12T17:04:17.647366+00:00 app[web.1]: 2020-02-12T17:04:17.670403+00:00 app[web.1]: 2020-02-12T17:04:17.692348+00:00 app[web.1]: 2020-02-12T17:04:17.713206+00:00 app[web.1]: 2020-02-12T17:04:17.737117+00:00 app[web.1]: 2020-02-12T17:04:17.761967+00:00 app[web.1]: 2020-02-12T17:04:17.781983+00:00 app[web.1]: 2020-02-12T17:04:17.794312+00:00 app[web.1]: [2020-02-12 17:04:17 +0000] [11] [INFO] Worker exiting (pid: 11) 2020-02-12T17:04:17.985341+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/" host=alphabot2.herokuapp.com request_id=a4839896-4116-45b9-85e2-335c408801c3 fwd="47.30.165.152" dyno=web.1 connect=0ms service=4411ms status=503 bytes=0 protocol=https 2020-02-12T17:04:17.987158+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/favicon.ico" host=alphabot2.herokuapp.com request_id=1e2a353e-9385-44ca-bc83-fd3d635a3f27 fwd="47.30.165.152" dyno=web.1 connect=5001ms service=5082ms status=503 bytes=0 protocol=https
2020-02-12T17:04:18.173845+00:00 app[web.1]: [2020-02-12 17:04:18 +0000] [4] [INFO] Shutting down: Master2020-02-12T17:04:18.173974+00:00 app[web.1]: [2020-02-12 17:04:18 +0000] [4] [INFO] Reason: Worker failed to boot. 2020-02-12T17:04:18.268855+00:00 heroku[web.1]: State changed from up to crashed 2020-02-12T17:04:18.247772+00:00 heroku[web.1]: Process exited with status 3 2020-02-12T17:04:19.273315+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=alphabot2.herokuapp.com request_id=1e4b4bd1-2405-4bbe-b183-841cefbadf8e fwd="47.30.165.152" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T17:04:20.936055+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=cd818734-d15a-4aa0-a8b9-0e206551509b fwd="47.30.165.152" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T17:04:21.811628+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=alphabot2.herokuapp.com request_id=36e65ee1-8c60-46fe-a69c-c3ace45e9134 fwd="47.30.165.152" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T17:04:26.292330+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=5213c783-9265-4e43-98e7-d46df0734a53 fwd="47.30.165.152" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T17:04:26.780175+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=alphabot2.herokuapp.com request_id=30f7542d-697c-4dbb-b34d-8c2e4c595bae fwd="47.30.165.152" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T17:05:43.477405+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=b65a15ba-a1c1-43fe-b48e-b6fbde49900e fwd="59.94.175.194" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T17:05:45.658721+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=alphabot2.herokuapp.com request_id=5816ff6f-3153-4d74-989a-05340c188880 fwd="59.94.175.194" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T17:05:57.689689+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=804a9d72-5522-415d-a076-50a417ba89e0 fwd="59.94.175.194" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T17:05:59.828637+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=alphabot2.herokuapp.com request_id=16f7a1ed-6b3f-4eb4-849c-c4cd2dfbfa4e fwd="59.94.175.194" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T17:07:14.626098+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=0f072ad3-9b6f-41ec-9099-d3e45ec2e306 fwd="59.94.175.194" dyno= connect= service= status=503 bytes= protocol=https 2020-02-12T17:07:17.071621+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=alphabot2.herokuapp.com request_id=62bdfc33-e900-4113-b5e0-05670c3a92e9 fwd="59.94.175.194" dyno= connect= service= status=503 bytes= protocol=https

chamkank commented 4 years ago

@dish34 Thanks for the details! This should fix your problem, let me know how it goes.

dish34 commented 4 years ago

It works sometimes after reload.

(MyflaskEnv) C:\Users\yashv\Desktop\flaskchatbot>heroku logs --tail 2020-02-14T01:09:29.425944+00:00 app[web.1]: [2020-02-14 01:09:29 +0000] [4] [INFO] Listening at: http://0.0.0.0:52981 (4) 2020-02-14T01:09:29.426115+00:00 app[web.1]: [2020-02-14 01:09:29 +0000] [4] [INFO] Using worker: sync 2020-02-14T01:09:29.441304+00:00 app[web.1]: [2020-02-14 01:09:29 +0000] [10] [INFO] Booting worker with pid: 10 2020-02-14T01:09:29.494952+00:00 app[web.1]: [2020-02-14 01:09:29 +0000] [11] [INFO] Booting worker with pid: 11 2020-02-14T01:09:30.201432+00:00 heroku[web.1]: State changed from starting to up 2020-02-14T01:09:31.292320+00:00 app[web.1]: [nltk_data] Downloading package stopwords to 2020-02-14T01:09:31.292417+00:00 app[web.1]: [nltk_data] /app/.heroku/python/nltk_data... 2020-02-14T01:09:31.293551+00:00 app[web.1]: [nltk_data] Package stopwords is already up-to-date! 2020-02-14T01:09:31.295102+00:00 app[web.1]: [nltk_data] Downloading package averaged_perceptron_tagger to 2020-02-14T01:09:31.295139+00:00 app[web.1]: [nltk_data] /app/.heroku/python/nltk_data... 2020-02-14T01:09:31.332200+00:00 app[web.1]: [nltk_data] Downloading package stopwords to 2020-02-14T01:09:31.332209+00:00 app[web.1]: [nltk_data] /app/.heroku/python/nltk_data... 2020-02-14T01:09:31.333167+00:00 app[web.1]: [nltk_data] Package stopwords is already up-to-date!
2020-02-14T01:09:31.334481+00:00 app[web.1]: [nltk_data] Downloading package averaged_perceptron_tagger to 2020-02-14T01:09:31.334516+00:00 app[web.1]: [nltk_data] /app/.heroku/python/nltk_data... 2020-02-14T01:09:31.437871+00:00 app[web.1]: [nltk_data] Unzipping taggers/averaged_perceptron_tagger.zip. 2020-02-14T01:09:31.438366+00:00 app[web.1]: [nltk_data] Error with downloaded zip file 2020-02-14T01:09:31.450955+00:00 app[web.1]: 2020-02-14T01:09:31.450956+00:00 app[web.1]: Traceback (most recent call last): 2020-02-14T01:09:31.450957+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker 2020-02-14T01:09:31.450958+00:00 app[web.1]: worker.init_process() 2020-02-14T01:09:31.450958+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 119, in init_process 2020-02-14T01:09:31.450958+00:00 app[web.1]: self.load_wsgi() 2020-02-14T01:09:31.450959+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi 2020-02-14T01:09:31.450959+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2020-02-14T01:09:31.450960+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi 2020-02-14T01:09:31.450960+00:00 app[web.1]: self.callable = self.load() 2020-02-14T01:09:31.450961+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load 2020-02-14T01:09:31.450961+00:00 app[web.1]: return self.load_wsgiapp() 2020-02-14T01:09:31.450961+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp 2020-02-14T01:09:31.450962+00:00 app[web.1]: return util.import_app(self.app_uri) 2020-02-14T01:09:31.450962+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 358, in import_app 2020-02-14T01:09:31.450962+00:00 app[web.1]: mod = importlib.import_module(module) 2020-02-14T01:09:31.450963+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/importlib/init.py", line 126, in import_module 2020-02-14T01:09:31.450963+00:00 app[web.1]: return _bootstrap._gcd_import(name[level:], package, level) 2020-02-14T01:09:31.450964+00:00 app[web.1]: File "", line 994, in _gcd_import 2020-02-14T01:09:31.450965+00:00 app[web.1]: File "", line 971, in _find_and_load 2020-02-14T01:09:31.450965+00:00 app[web.1]: File "", line 955, in _find_and_load_unlocked 2020-02-14T01:09:31.450966+00:00 app[web.1]: File "", line 665, in _load_unlocked 2020-02-14T01:09:31.450966+00:00 app[web.1]: File "", line 678, in exec_module 2020-02-14T01:09:31.450966+00:00 app[web.1]: File "", line 219, in _call_with_frames_removed 2020-02-14T01:09:31.450967+00:00 app[web.1]: File "/app/app.py", line 87, in 2020-02-14T01:09:31.450973+00:00 app[web.1]: "Hi", "Hi there, how can I help?", "hi", "Hi there, how can I help?","How are you", "Hi there, how can I help?", "Is anyone there?", "Hi there, how can I help?", "Hello", "Hi there, how can I help?", "Good day", "Hi there, how can I help?", "Whats up", "Hi there, how can I help?","good morning", "Hi there, how can I help?","good afternoon", "Hi there, how can I help?","hey", "Hi there, how can I help?" 2020-02-14T01:09:31.450973+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/trainers.py", line 103, in train 2020-02-14T01:09:31.450974+00:00 app[web.1]: statement_search_text = self.chatbot.storage.tagger.get_bigram_pair_string(text) 2020-02-14T01:09:31.450974+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/tagging.py", line 170, in get_bigram_pair_string 2020-02-14T01:09:31.450975+00:00 app[web.1]: pos_tags.extend(self.get_pos_tags(words)) 2020-02-14T01:09:31.450975+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/tagging.py", line 109, in get_pos_tags 2020-02-14T01:09:31.450975+00:00 app[web.1]: tags = pos_tag(words, lang=self.language.ISO_639) 2020-02-14T01:09:31.450976+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/tag/init.py", line 161, in pos_tag 2020-02-14T01:09:31.450976+00:00 app[web.1]: tagger = _get_tagger(lang) 2020-02-14T01:09:31.450977+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/tag/init.py", line 107, in _get_tagger 2020-02-14T01:09:31.450977+00:00 app[web.1]: tagger = PerceptronTagger() 2020-02-14T01:09:31.450977+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/tag/perceptron.py", line 162, in init 2020-02-14T01:09:31.450978+00:00 app[web.1]: find('taggers/averaged_perceptron_tagger/' + PICKLE) 2020-02-14T01:09:31.450978+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/data.py", line 673, in find 2020-02-14T01:09:31.450978+00:00 app[web.1]: return find(modified_name, paths) 2020-02-14T01:09:31.450979+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/data.py", line 660, in find 2020-02-14T01:09:31.450979+00:00 app[web.1]: return ZipFilePathPointer(p, zipentry) 2020-02-14T01:09:31.450980+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/compat.py", line 228, in _decorator 2020-02-14T01:09:31.450981+00:00 app[web.1]: return init_func(*args, *kwargs) 2020-02-14T01:09:31.450981+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/data.py", line 506, in init 2020-02-14T01:09:31.450981+00:00 app[web.1]: zipfile = OpenOnDemandZipFile(os.path.abspath(zipfile)) 2020-02-14T01:09:31.450982+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/compat.py", line 228, in _decorator 2020-02-14T01:09:31.450982+00:00 app[web.1]: return init_func(args, **kwargs) 2020-02-14T01:09:31.450982+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/data.py", line 1055, in init 2020-02-14T01:09:31.450983+00:00 app[web.1]: zipfile.ZipFile.init(self, filename) 2020-02-14T01:09:31.450983+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/zipfile.py", line 1131, in init 2020-02-14T01:09:31.450984+00:00 app[web.1]: self._RealGetContents() 2020-02-14T01:09:31.450984+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/zipfile.py", line 1198, in _RealGetContents 2020-02-14T01:09:31.450991+00:00 app[web.1]: raise BadZipFile("File is not a zip file") 2020-02-14T01:09:31.451067+00:00 app[web.1]: zipfile.BadZipFile: File is not a zip file 2020-02-14T01:09:31.452338+00:00 app[web.1]: [2020-02-14 01:09:31 +0000] [11] [INFO] Worker exiting (pid: 11) 2020-02-14T01:09:31.669263+00:00 app[web.1]: [nltk_data] Unzipping taggers/averaged_perceptron_tagger.zip. 2020-02-14T01:09:38.078238+00:00 app[web.1]: 2020-02-14T01:09:38.155397+00:00 app[web.1]: 2020-02-14T01:09:38.205214+00:00 app[web.1]: 2020-02-14T01:09:38.248898+00:00 app[web.1]: 2020-02-14T01:09:38.286490+00:00 app[web.1]: 2020-02-14T01:09:38.416878+00:00 app[web.1]: 2020-02-14T01:09:38.479808+00:00 app[web.1]: 2020-02-14T01:09:38.591894+00:00 app[web.1]: 2020-02-14T01:09:38.642821+00:00 app[web.1]: 2020-02-14T01:09:38.724138+00:00 app[web.1]: 2020-02-14T01:09:38.766798+00:00 app[web.1]: 2020-02-14T01:09:38.800261+00:00 app[web.1]: 2020-02-14T01:09:38.826865+00:00 app[web.1]: 2020-02-14T01:09:38.849701+00:00 app[web.1]: 2020-02-14T01:09:38.869273+00:00 app[web.1]: 2020-02-14T01:09:38.886851+00:00 app[web.1]: 2020-02-14T01:09:38.899085+00:00 app[web.1]: [2020-02-14 01:09:38 +0000] [10] [INFO] Worker exiting (pid: 10) 2020-02-14T01:09:39.312099+00:00 app[web.1]: [2020-02-14 01:09:39 +0000] [4] [INFO] Shutting down: Master2020-02-14T01:09:39.312183+00:00 app[web.1]: [2020-02-14 01:09:39 +0000] [4] [INFO] Reason: Worker failed to boot. 2020-02-14T01:09:39.405864+00:00 heroku[web.1]: Process exited with status 3 2020-02-14T01:09:39.419110+00:00 heroku[web.1]: State changed from up to crashed 2020-02-14T01:09:40.461398+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=99c204ec-ce6c-474a-b4cc-a5b4487b2d57 fwd="59.94.174.21" dyno= connect= service= status=503 bytes= protocol=https 2020-02-14T01:10:09.616436+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=e7014cd9-ccf7-4611-a936-805260427c06 fwd="59.94.174.21" dyno= connect= service= status=503 bytes= protocol=https 2020-02-14T01:10:10.660892+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=2a97816f-ab6d-49f4-bc74-ffdc20872272 fwd="59.94.174.21" dyno= connect= service= status=503 bytes= protocol=https 2020-02-14T01:10:25.995645+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=39e1f96a-2a00-42c8-b1a4-d77bd53e7890 fwd="59.94.174.21" dyno= connect= service= status=503 bytes= protocol=https 2020-02-14T01:12:06.856700+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=alphabot2.herokuapp.com request_id=9ca97f76-c176-4ed8-baa8-d78d29453838 fwd="59.94.174.21" dyno= connect= service= status=503 bytes= protocol=https