pysat / pysatNASA

pysat support for NASA Instruments
BSD 3-Clause "New" or "Revised" License
21 stars 6 forks source link

BUG: Missing 'LastModified' field in FORMOSAT-1 CdasWs XML data blocks download and remote file listing #236

Closed Aadarsh-Govada closed 3 months ago

Aadarsh-Govada commented 3 months ago

Description

When attempting to download or list remote files from the FORMOSAT-1 Ion Velocity Meter (pysatNASA.Instruments.formosat1_ivm), an AttributeError occurs during the retrieval of original files by the cdasws library, which is left unhandled and stops the download/listing.

To Reproduce this bug:

Run pysatNASA tests for release candidate, specifically test_download and test_remote_file_list.

Test configuration

Additional context

Both downloading and listing remote files use cdas_list_remote_files() from pysatNASA/instruments/methods/cdaweb.py, which depends on cdasws.CdasWs._get_data_result_dict() from the separate cdasws library. This function attempts to return a file description dictionary by searching the file's XML data for each of the required fields. In the case of FORMOSAT-1 IVM, the last required field (LastModified) is missing from the XML, so the search returns a NoneType. This results in an AttributeError when cdasws.CdasWs._get_data_result_dict() tries to access the text returned from the XML search.

jklenzing commented 3 months ago

Looks like this is related to the new release in cdasws. Presumably this could be fixed by updating the SPASE metadata. Pinging @JonathonMSmith

jklenzing commented 3 months ago

Remote xml was updated, closing for now