pysat/pysatNASA

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

Closed this issue · 2 comments

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

  • OS: GitHub Actions Ubuntu, Windows, and MacOS
  • Version: Python 3.10 - 3.12

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.

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

Remote xml was updated, closing for now