Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MesowestPointData.points_from_geometry does not consider zero stations being returned #34

Open
micahjohnson150 opened this issue Jan 24, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@micahjohnson150
Copy link
Contributor

micahjohnson150 commented Jan 24, 2022

  • metloom version: 0.2.1
  • Python version: 3.9
  • Operating System: MacOS

Description

Using a small bounding box to grab mesowest stations and received an error

What I Did

Running this I receive this traceback

File "/home/user/envs/loomenv/lib/python3.9/site-packages/metloom/pointdata/mesowest.py", line 285, in points_from_geometry
  data = jdata['STATION']
KeyError: 'STATION'

It would appear mesowest doesn't consider receiving no stations back. The solution here is to return an empty list instead of trying to index on it.

@micahjohnson150 micahjohnson150 added the bug Something isn't working label Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant