Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load ADAPT map with sunpy>=6.0.0 #66

Closed
NyankoSong opened this issue Aug 29, 2024 · 2 comments
Closed

Unable to load ADAPT map with sunpy>=6.0.0 #66

NyankoSong opened this issue Aug 29, 2024 · 2 comments

Comments

@NyankoSong
Copy link

Describe the bug

Hi!
I'm here just to report this bug. I have downgraded sunpy to 5.1.4 and everything works fine now.

MultipleMatchError: Too many candidate types identified ([<class 'sunpy.map.sources.adapt.ADAPTMap'>, <class 'sunkit_magex.pfss.map.ADAPTMap'>]). Specify enough keywords to guarantee unique type identification.

To Reproduce

import sunpy.map

# this works fine
sunpy.map.Map('adapt40311_03k012_202201010000_i00005600n1.fts.gz', hdus=0) # random adapt map
from sunkit_magex.pfss.utils import load_adapt

# MultipleMatchError: Too many candidate types identified ([<class 'sunpy.map.sources.adapt.ADAPTMap'>, <class 'sunkit_magex.pfss.map.ADAPTMap'>]). Specify enough keywords to guarantee unique type identification.
load_adapt('adapt40311_03k012_202201010000_i00005600n1.fts.gz')
from sunkit_magex.pfss.utils import load_adapt
import sunpy.map

# MultipleMatchError: Too many candidate types identified ([<class 'sunpy.map.sources.adapt.ADAPTMap'>, <class 'sunkit_magex.pfss.map.ADAPTMap'>]). Specify enough keywords to guarantee unique type identification.
sunpy.map.Map('adapt40311_03k012_202201010000_i00005600n1.fts.gz', hdus=0)

Screenshots

No response

System Details

sunpy=6.0.1
astropy=6.1.2
sunkit-magex=1.0.0
python=3.11.8
OS: Ubuntu 24.04 LTS

Installation method

conda

@nabobalis nabobalis added the bug label Aug 29, 2024
@nabobalis
Copy link
Contributor

Thanks for the report @NyankoSong.

I think the problem is that we forgot to add an escape for the new Map class in sunpy 6.0.0.

The fix is hopefully in the open PR that removes that class from this library.

For now, we will have to patch sunpy to prevent this from erroring and getting out a bugfix for 6.0.0

@nabobalis
Copy link
Contributor

This has been patched in sunpy 6.0.1 and #63 fixes it in sunkit-magex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants