MacHu-GWU / uszipcode-project

USA zipcode programmable database, includes up-to-date census and geometry information.
MIT License
231 stars 49 forks source link

Library fails - Unable to get simple database #47

Closed glukasiknuro closed 3 years ago

glukasiknuro commented 3 years ago

Describe the bug

https://datahub.io/machu-gwu/uszipcode-0.2.0-simple_db/r/simple_db.sqlite returns:

Error 502 Ray ID: 625b403e4b5ded73 • 2021-02-22 19:53:02 UTC Bad gateway

Also, library returns cryptic error in such case. Looks like it downloads sqlite file (which contains HTML error), but does not notice this was an error.

sqlite3.DatabaseError: file is encrypted or is not a database

To Reproduce

See above.

Expected behavior

  1. Able to download
  2. In case of download error prints an error message that this happened

Screenshots

image

MacHu-GWU commented 3 years ago

Hi @glukasiknuro there was some issue with database file 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.

glukasiknuro commented 3 years ago

Just for reference, this comment contains database that can be used instead in case of issues: https://github.com/MacHu-GWU/uszipcode-project/issues/40#issuecomment-688323810

glukasiknuro commented 3 years ago

@MacHu-GWU could you also change code in https://github.com/MacHu-GWU/uszipcode-project/blob/53f37b9a6fd363c78ff16bab43738f87dff248ea/uszipcode/db.py#L68 so that an error is reported if returned status code is not 200 ?

MacHu-GWU commented 3 years ago

@glukasiknuro fixed in 0.2.6