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.
Description
When attempting to download or list remote files from the FORMOSAT-1 Ion Velocity Meter (
pysatNASA.Instruments.formosat1_ivm
), anAttributeError
occurs during the retrieval of original files by thecdasws
library, which is left unhandled and stops the download/listing.To Reproduce this bug:
Run
pysatNASA
tests for release candidate, specificallytest_download
andtest_remote_file_list
.Test configuration
Additional context
Both downloading and listing remote files use
cdas_list_remote_files()
frompysatNASA/instruments/methods/cdaweb.py
, which depends oncdasws.CdasWs._get_data_result_dict()
from the separatecdasws
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 aNoneType
. This results in anAttributeError
whencdasws.CdasWs._get_data_result_dict()
tries to access the text returned from the XML search.