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

TypeError: <class 'numpy.typing._dtype_like._SupportsDType'> is not a generic class] #1092

Closed
Mosw5871 opened this issue Jul 23, 2022 · 15 comments
Labels
bug Something isn't working

Comments

@Mosw5871
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior, preferably code snippet.

Expected behavior
A clear and concise description of what you expected to happen.

System (please complete the following information):

  • Python version: [e.g. 3.7]
  • darts version [e.g. 0.14.0]

Additional context
Add any other context about the problem here.

@Mosw5871 Mosw5871 added bug Something isn't working triage Issue waiting for triaging labels Jul 23, 2022
@mylesholley888
Copy link

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior, preferably code snippet.

Expected behavior A clear and concise description of what you expected to happen.

System (please complete the following information):

  • Python version: [e.g. 3.7]
  • darts version [e.g. 0.14.0]

Additional context Add any other context about the problem here.

Describe the bug:
Get this error message when trying to import pyspedas and pytplot:
TypeError: <class 'numpy.typing._dtype_like._SupportsDType'> is not a generic class

To Reproduce
import pyspedas from pytplot import tplot

Expected behavior
Expected it to import without a hitch

System (please complete the following information):

Python version: [JupyterLab: Version 3.2.1]

Additional context:
Want to import data from MMS mission

@OmarHory
Copy link

Same issue. Can't use darts.

@OmarHory
Copy link

image

The problem appears to be from xarray, as xarray have updated their package as in https://pypi.org/project/xarray/#history

@mylesholley888
Copy link

mylesholley888 commented Jul 24, 2022

image

The problem appears to be from xarray, as xarray have updated their package as in https://pypi.org/project/xarray/#history

To resolve the issue did you just download the updated* package?

@mylesholley888
Copy link

Attempted to update but I already have latest version of xarray:
I ran this:
!pip install --upgrade xarray

And got this output:
Requirement already satisfied: xarray in ./opt/anaconda3/lib/python3.9/site-packages (2022.6.0)

@OmarHory
Copy link

Attempted to update but I already have latest version of xarray:

I ran this:

!pip install --upgrade xarray

And got this output:

Requirement already satisfied: xarray in ./opt/anaconda3/lib/python3.9/site-packages (2022.6.0)

The problem is still not resolved, I have been trying out with the packages ever since without promising results.
I installed Darts 0.8.0 and the import worked but there are a lot of functionalities that I need in which do not exist like the BlockRNN and the covariates.

@mylesholley888
Copy link

Attempted to update but I already have latest version of xarray:
I ran this:
!pip install --upgrade xarray
And got this output:
Requirement already satisfied: xarray in ./opt/anaconda3/lib/python3.9/site-packages (2022.6.0)

The problem is still not resolved, I have been trying out with the packages ever since without promising results. I installed Darts 0.8.0 and the import worked but there are a lot of functionalities that I need in which do not exist like the BlockRNN and the covariates.

Yea I'm in the same boat:
import pyspedas from pytplot import tplot

Resulted in a new error:
TypeError: <class 'numpy.typing._dtype_like._SupportsDType'> is not a generic class

@hrzn
Copy link
Contributor

hrzn commented Jul 24, 2022

Hi, I'm not sure how to reproduce, and whether this is an issue with Darts.
import pyspedas from pytplot import tplot is not a valid command. Could you please let us know how to reproduce the issue?

@OmarHory
Copy link

pip install xarray==0.20.2
Worked for me, today is a good day.

@mylesholley888
Copy link

Hi, I'm not sure how to reproduce, and whether this is an issue with Darts. import pyspedas from pytplot import tplot is not a valid command. Could you please let us know how to reproduce the issue?

Really? I am new to this.
I was following the documentation here:
https://github.com/spedas/mms-examples/blob/master/webinars/Analyzing_MMS_Data_with_pySPEDAS_1Dec2021.ipynb

@mylesholley888
Copy link

pip install xarray==0.20.2
This worked for me too! Thank you so much!

@Attol8
Copy link

Attol8 commented Jul 26, 2022

pip install xarray==0.20.2 Worked for me, today is a good day.

I have run into the same issue and this comment from @OmarHory worked for me too

@Mosw5871
Copy link
Author

OH! GOD! Do you konw how I sloved this problem? I Reset my Mac! 555555. Everything is gone, so I can have a new start!

@benoit-cty
Copy link

benoit-cty commented Aug 3, 2022

Thanks for the workaroud, here is the issue in xarray pydata/xarray#6818.
Downgrading to "newer" version 2022.3.0 also work.

@Mosw5871 Mosw5871 closed this as completed Aug 6, 2022
@hrzn
Copy link
Contributor

hrzn commented Aug 8, 2022

Is anyone able to provide a stacktrace of this issue? I suspect #1106 might have fixed it, but I still want to try and understand if that was related to Darts (as the OP mentions a problem when importing pyspedas).

@hrzn hrzn reopened this Aug 8, 2022
@hrzn hrzn removed the triage Issue waiting for triaging label Aug 23, 2022
@hrzn hrzn closed this as completed Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants