m9brady / eodms-api-client

EODMS API Client for Python
https://m9brady.github.io/eodms-api-client/
MIT License
18 stars 5 forks source link

could not query NAPL #7

Closed c-mancuso closed 1 year ago

c-mancuso commented 1 year ago

Got a KeyError when I tried to query NAPL.

eodms -c NAPL -g query_aoi.geojson --verbose 2022-09-14 22:45:06 | eodmsapi.cli | DEBUG | Connecting to EODMS Enter EODMS username: cmancuso Enter EODMS password: 2022-09-14 22:45:11 | eodmsapi.cli | DEBUG | Connected to EODMS 2022-09-14 22:45:11 | eodmsapi.cli | INFO | Querying EODMS API 2022-09-14 22:45:13 | eodmsapi.main | WARNING | No results found Traceback (most recent call last): File "/home/cmancuso/miniconda3/envs/eodms-env/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3629, in get_loc return self._engine.get_loc(casted_key) File "pandas/_libs/index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 163, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'Incidence Angle (Low)'

m9brady commented 1 year ago

Hi, thanks for the report. I'll look into this as soon as possible.

m9brady commented 1 year ago

Hi @c-mancuso I've pushed a new version (see v1.2.5) The updated package will take a few hours to show up on conda-forge but let me know if it solves the errors you were seeing.

I did notice that your query wasn't returning any results so you may want to widen your temporal window through using the -s (for start date) and -e (for end date) CLI args.

with v1.2.5 I was able to get results for testing with the following query:

$ eodms --version
eodms-api-client 1.2.5

$ eodms -c NAPL -s 1990-07-12 -e 1990-07-12 -g lakewinnipegnorth.geojson
2022-09-15 10:56:20 | eodmsapi.cli    | INFO     | Querying EODMS API
Fetching result metadata: 100%|███████████████████████████████████████████| 13/13 [00:22<00:00,  1.70s/item]
2022-09-15 10:56:45 | eodmsapi.cli    | INFO     | Finished query. 13 results

the geojson file from ☝️ is from the documentation site: https://eodms-api-client.readthedocs.io/en/latest/_static/lakewinnipegnorth.geojson

c-mancuso commented 1 year ago

Hi @m9brady Thanks for the prompt reply and for fixing that!

Just tested with my AOI and yours. Everything appears to be working.

Thanks!

m9brady commented 1 year ago

Glad to hear - thanks again for the report. I must admit I don't use NAPL all that much so it is helpful to get reports from other folks.