You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SW-All.csv Issue Summary:
Executing the example code from the PyMSIS documentation results in a ValueError. The error message indicates that an empty string cannot be converted to an int32 at a specific row and column. This issue prevents users from successfully using the pymsis.calculate function as demonstrated in the documentation.
Steps to Reproduce:
Use the following code (identical to the documentation example):
importpymsisimportnumpyasnpdates=np.arange(
np.datetime64("2003-10-28T00:00"),
np.datetime64("2003-11-04T00:00"),
np.timedelta64(30, "m")
)
# geomagnetic_activity=-1 is a storm-time rundata=pymsis.calculate(dates, 0, 0, 400, geomagnetic_activity=-1)
Run the code in your Python environment.
Expected Behavior:
The pymsis.calculate function should execute without errors and return the calculated atmospheric data based on the provided dates and parameters.
Actual Behavior:
A ValueError is raised during execution:
ValueError: could not convert string '' to int32 at row 24531, column 13.
Error Traceback:
/usr/local/lib/python3.10/dist-packages/pymsis/utils.py:45: UserWarning: Downloading ap and F10.7 data from https://celestrak.org/SpaceData/SW-All.csv
warnings.warn(f"Downloading ap and F10.7 data from {_F107_AP_URL}")
/usr/local/lib/python3.10/dist-packages/pymsis/utils.py:45: UserWarning: Downloading ap and F10.7 data from https://celestrak.org/SpaceData/SW-All.csv
warnings.warn(f"Downloading ap and F10.7 data from {_F107_AP_URL}")
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-41-161cc04f4b20> in <cell line: 4>()
2 dates = np.arange(np.datetime64("2003-10-28T00:00"), np.datetime64("2003-11-04T00:00"), np.timedelta64(30, "m"))
3 # geomagnetic_activity=-1 is a storm-time run
----> 4 data = pymsis.calculate(dates, 0, 0, 400, geomagnetic_activity=-1)
5 frames
/usr/local/lib/python3.10/dist-packages/numpy/lib/npyio.py in _read(fname, delimiter, comment, quote, imaginary_unit, usecols, skiplines, max_rows, converters, ndmin, unpack, dtype, encoding)
1014
1015 if read_dtype_via_object_chunks is None:
-> 1016 arr = _load_from_filelike(
1017 data, delimiter=delimiter, comment=comment, quote=quote,
1018 imaginary_unit=imaginary_unit,
ValueError: could not convert string '' to int32 at row 24531, column 13.
Environment Details:
Python Version: 3.11.9 (VSCode), 3.10.12 (Colab)
PyMSIS Version: 0.10.0
Operating System: Window 11 - VSCode and Colab
Attached file is the one
The text was updated successfully, but these errors were encountered:
This is an issue at Celestrak's end where they have published empty data under observed values.
I suppose pymsis can add a step where it discards rows with empty values if found under observed data.
EDIT: Looks like celestrak has fixed their CSV. @ssmong - Try re-running your code with the latest CSV
SW-All.csv
Issue Summary:
Executing the example code from the PyMSIS documentation results in a
ValueError
. The error message indicates that an empty string cannot be converted to anint32
at a specific row and column. This issue prevents users from successfully using thepymsis.calculate
function as demonstrated in the documentation.Steps to Reproduce:
Use the following code (identical to the documentation example):
Run the code in your Python environment.
Expected Behavior:
The
pymsis.calculate
function should execute without errors and return the calculated atmospheric data based on the provided dates and parameters.Actual Behavior:
A
ValueError
is raised during execution:Error Traceback:
Environment Details:
Attached file is the one
The text was updated successfully, but these errors were encountered: