sunpy: Error pulling GOES/XRS data on Windows?
Description
I get an error (TypeError: cannot unpack non-iterable NotImplementedType object) pulling GOES/XRS data from SunPy on Windows using the code below. This works with no issues on MacOS.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-9-400b67f69c2d> in <module>
6 files = Fido.fetch(result)
7
----> 8 goes = timeseries.TimeSeries(files, concatenate=True, )
9 goes = goes.truncate('2013-11-05 22:00','2013-11-05 23:00')
C:\ProgramData\Anaconda3\lib\site-packages\sunpy\timeseries\timeseries_factory.py in __call__(self, silence_errors, *args, **kwargs)
404 for filepath in filepaths:
405 try:
--> 406 new_ts = self._check_registered_widgets(filepath=filepath, **kwargs)
407 new_timeseries.append(new_ts)
408 except (NoMatchError, MultipleMatchError, ValidationFunctionError):
C:\ProgramData\Anaconda3\lib\site-packages\sunpy\timeseries\timeseries_factory.py in _check_registered_widgets(self, **kwargs)
527 units = kwargs.pop('units', None)
528 if filepath:
--> 529 data, meta, units = WidgetType._parse_file(filepath)
530
531 # Now return a TimeSeries from the given file.
TypeError: cannot unpack non-iterable NotImplementedType object
Expected vs Actual behavior
The files download on MacOS and can be analyzed without issue.
Steps to Reproduce
from sunpy.time import parse_time
from sunpy import timeseries
from sunpy.net import Fido, attrs as a
result = Fido.search(
a.Time('2013/11/04 06:00', '2013/11/06 00:00'),
a.Instrument.xrs,
)
files = Fido.fetch(result)
goes = timeseries.TimeSeries(files, concatenate=True, )
goes = goes.truncate('2013-11-05 22:00','2013-11-05 23:00')
System Details
============================== SunPy Installation Information
####### General ####### Time : Monday, 03. May 2021 09:03PM UT System : Windows Processor : AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD Arch : 64bit SunPy : 2.1.4 OS: Windows 10 10.0.19041 (AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD)
################## Required Libraries ################## Python: 3.8.3 NumPy: 1.20.1 SciPy: 1.6.2 matplotlib: 3.3.4 Astropy: 4.2.1 Pandas: 1.2.4 parfive: 1.3.0
##################### Recommended Libraries ##################### beautifulsoup: 4.9.3 PyQt4: NOT INSTALLED PyQt5: 5.9.2 Zeep: 4.0.0 Sqlalchemy: 1.4.7 drms: 0.6.1
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 50 (26 by maintainers)
Yaaay! Exactly! I also ran this code and got the results. yeap this is what I was looking for! Thank you very much- thank you for your patience to help a beginner like me! Thank u so much! we got it!!!
Hi, it appeared an issue related to my sunpy version earlier I was using 3.1.1 now updated to 3.1.6 now this example works fine. any way the files variable print as [‘/home/shifana/sunpy/data/sci_gxrs-l2-irrad_g15_d20120712_v0-0-0.nc’]
I have already tried this, it doesn’t change the outcome.
Looks like it to me. I can load it with netcdf4, at least: