Downloading data using Fido

185 views
Skip to first unread message

Mathew Owens

unread,
Aug 18, 2022, 7:10:08 AM8/18/22
to SunPy
Hi all,

I'm trying to use Fido to access the OMNI dataset. Fido.search returns a sensible result, but Fido.fetch returns a TypeError (TypeError: __init__() got an unexpected keyword argument 'headers').

I'm really confused, as this has worked in the past, under the same environment and same machine. 

Minimal example:

from astropy.time import Time
from sunpy.net import Fido
from sunpy.net import attrs

starttime = Time('2010-04-03 11:59:59.998069')
endtime = Time('2010-04-30 11:00:03.598063')

trange = attrs.Time(starttime, endtime)
dataset = attrs.cdaweb.Dataset('OMNI2_H0_MRG1HR')
result = Fido.search(trange, dataset)
downloaded_files = Fido.fetch(result)


Which returns:

Untitled.png

The results from fido.search:
In [28]  : result
Out[28]:
<sunpy.net.fido_factory.UnifiedResponse object at 0x00000253AD03CC10>
Results from 1 Provider:

1 Results from the CDAWEBClient:
Source: https://cdaweb.gsfc.nasa.gov/index.html

    Dataset            Start time               End time      
--------------- ----------------------- -----------------------
OMNI2_H0_MRG1HR 2010-01-01 00:00:00.000 2010-06-30 23:00:00.000


Which looks fine? I'm running Sunpy 4.0.0 and Astropy 5.1.

Thanks in advance, Matt.

Nabil Freij

unread,
Aug 18, 2022, 10:53:38 AM8/18/22
to SunPy
Hello,

Could you see about updating to sunpy 4.0.4, there was a bug in the downloader with a dependency that we had to patch.

Cheers,
Nabil

Mathew Owens

unread,
Aug 19, 2022, 4:20:38 AM8/19/22
to SunPy
Thanks Nabil!

It's an odd one - using the exact same environment, it was a problem some machines, but not others. But updating to 4.0.4 does seem to have fixed it, at least on the one problem machine I can currently access.

Reply all
Reply to author
Forward
0 new messages