calum-chamberlain / ESCI451-Python

Introduction to Python for VUW ESCI 451 course.
GNU General Public License v3.0
11 stars 5 forks source link

helper get_geonet_quakes doesn't provide a useful error for failed queries #27

Closed FinniganIK closed 1 year ago

FinniganIK commented 2 years ago

When trying to download info pre-2020 get the following error:

ValueError: Missing column provided to 'parse_dates': 'modificationtime, origintime'

calum-chamberlain commented 2 years ago

This is because the request is too large. When the request is too large the "data/earthquakes.csv" file just contains the response:

bad request: Queried data size too big, please change parameters to reduce query size.

The helper should check this and report this as the error to the user rather than this opaque error!