MacHu-GWU/uszipcode-project

Library stopped working, crash on boot

francisjervis opened this issue · 2 comments

I have been using uszipcode for months and it suddenly stopped working. I did not change anything in my requirements.txt or anything else that could have caused this issue. Now when I try to restart my server I get the following:

2021-02-22T04:11:59.344048+00:00 app[web.1]: Exception ignored in: <bound method SearchEngine.__del__ of <uszipcode.search.SearchEngine object at 0x7fd84bc16a58>>
2021-02-22T04:11:59.344112+00:00 app[web.1]: Traceback (most recent call last):
2021-02-22T04:11:59.344153+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/uszipcode/search.py", line 112, in __del__
2021-02-22T04:11:59.345406+00:00 app[web.1]:     if self.ses:
2021-02-22T04:11:59.348880+00:00 app[web.1]: AttributeError: 'SearchEngine' object has no attribute 'ses'
2021-02-22T04:11:59.909128+00:00 app[web.1]: [2021-02-22 04:11:59 +0000] [34] [INFO] Booting worker with pid: 34
2021-02-22T04:11:59.955068+00:00 app[web.1]: [2021-02-22 04:11:59 +0000] [36] [INFO] Booting worker with pid: 36
2021-02-22T04:12:00.027154+00:00 app[web.1]: [2021-02-22 04:12:00 +0000] [37] [INFO] Booting worker with pid: 37
2021-02-22T04:12:00.033332+00:00 app[web.1]: [2021-02-22 04:12:00 +0000] [38] [INFO] Booting worker with pid: 38
2021-02-22T04:12:03.765888+00:00 app[web.1]: Start downloading data for simple zipcode database, total size 9MB ...
2021-02-22T04:12:04.192924+00:00 app[web.1]: Start downloading data for simple zipcode database, total size 9MB ...
2021-02-22T04:12:04.636695+00:00 app[web.1]: Start downloading data for simple zipcode database, total size 9MB ...
2021-02-22T04:12:04.956754+00:00 app[web.1]: Start downloading data for simple zipcode database, total size 9MB ...
2021-02-22T04:12:30.254613+00:00 app[web.1]: [2021-02-22 04:12:30 +0000] [4] [CRITICAL] WORKER TIMEOUT (pid:34)
2021-02-22T04:12:30.254810+00:00 app[web.1]: [2021-02-22 04:12:30 +0000] [4] [CRITICAL] WORKER TIMEOUT (pid:36)
2021-02-22T04:12:30.255022+00:00 app[web.1]: [2021-02-22 04:12:30 +0000] [4] [CRITICAL] WORKER TIMEOUT (pid:37)
2021-02-22T04:12:30.257715+00:00 app[web.1]: [2021-02-22 04:12:30 +0000] [36] [INFO] Worker exiting (pid: 36)
2021-02-22T04:12:30.262161+00:00 app[web.1]: [2021-02-22 04:12:30 +0000] [4] [CRITICAL] WORKER TIMEOUT (pid:38)
2021-02-22T04:12:30.263997+00:00 app[web.1]: Exception ignored in: <bound method SearchEngine.__del__ of <uszipcode.search.SearchEngine object at 0x7fd84bc54b38>>
2021-02-22T04:12:30.264057+00:00 app[web.1]: Traceback (most recent call last):
2021-02-22T04:12:30.264097+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/uszipcode/search.py", line 112, in __del__
2021-02-22T04:12:30.265194+00:00 app[web.1]:     if self.ses:
2021-02-22T04:12:30.265253+00:00 app[web.1]: AttributeError: 'SearchEngine' object has no attribute 'ses'
2021-02-22T04:12:30.268294+00:00 app[web.1]: [2021-02-22 04:12:30 +0000] [34] [INFO] Worker exiting (pid: 34)
2021-02-22T04:12:30.271511+00:00 app[web.1]: Exception ignored in: <bound method SearchEngine.__del__ of <uszipcode.search.SearchEngine object at 0x7fd84bc54b38>>
2021-02-22T04:12:30.271569+00:00 app[web.1]: Traceback (most recent call last):
2021-02-22T04:12:30.271607+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/uszipcode/search.py", line 112, in __del__
2021-02-22T04:12:30.271855+00:00 app[web.1]: [2021-02-22 04:12:30 +0000] [37] [INFO] Worker exiting (pid: 37)
2021-02-22T04:12:30.272425+00:00 app[web.1]:     if self.ses:
2021-02-22T04:12:30.272431+00:00 app[web.1]: AttributeError: 'SearchEngine' object has no attribute 'ses'
2021-02-22T04:12:30.273443+00:00 app[web.1]: Exception ignored in: <bound method SearchEngine.__del__ of <uszipcode.search.SearchEngine object at 0x7fd84bc54ac8>>
2021-02-22T04:12:30.273480+00:00 app[web.1]: Traceback (most recent call last):
2021-02-22T04:12:30.273512+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/uszipcode/search.py", line 112, in __del__
2021-02-22T04:12:30.274135+00:00 app[web.1]:     if self.ses:
2021-02-22T04:12:30.274169+00:00 app[web.1]: AttributeError: 'SearchEngine' object has no attribute 'ses'
2021-02-22T04:12:30.319813+00:00 app[web.1]: [2021-02-22 04:12:30 +0000] [38] [INFO] Worker exiting (pid: 38)
2021-02-22T04:12:30.328268+00:00 app[web.1]: Exception ignored in: <bound method SearchEngine.__del__ of <uszipcode.search.SearchEngine object at 0x7fd84bc54b38>>
2021-02-22T04:12:30.328276+00:00 app[web.1]: Traceback (most recent call last):
2021-02-22T04:12:30.328329+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/uszipcode/search.py", line 112, in __del__
2021-02-22T04:12:30.329134+00:00 app[web.1]:     if self.ses:
2021-02-22T04:12:30.329139+00:00 app[web.1]: AttributeError: 'SearchEngine' object has no attribute 'ses'

This was transient, but just un/re-installing with pip a couple of times didn't fix it immediately. Appears to be working now.

@francisjervis there was some issue with database hosting. I am actively developing a new version of it including latest 2020 cencus data and finance statistics, hope I can release the new one in one month.