darts icon indicating copy to clipboard operation
darts copied to clipboard

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

Open Mosw5871 opened this issue 3 years ago • 15 comments

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 avatar Jul 23 '22 11:07 Mosw5871

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

mylesholley888 avatar Jul 23 '22 23:07 mylesholley888

Same issue. Can't use darts.

OmarHory avatar Jul 24 '22 11:07 OmarHory

image

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

OmarHory avatar Jul 24 '22 12:07 OmarHory

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 avatar Jul 24 '22 17:07 mylesholley888

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)

mylesholley888 avatar Jul 24 '22 17:07 mylesholley888

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.

OmarHory avatar Jul 24 '22 17:07 OmarHory

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

mylesholley888 avatar Jul 24 '22 17:07 mylesholley888

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?

hrzn avatar Jul 24 '22 20:07 hrzn

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

OmarHory avatar Jul 25 '22 11:07 OmarHory

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 avatar Jul 25 '22 18:07 mylesholley888

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

mylesholley888 avatar Jul 25 '22 18:07 mylesholley888

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

Attol8 avatar Jul 26 '22 12:07 Attol8

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!

Mosw5871 avatar Jul 28 '22 08:07 Mosw5871

Thanks for the workaroud, here is the issue in xarray https://github.com/pydata/xarray/issues/6818. Downgrading to "newer" version 2022.3.0 also work.

benoit-cty avatar Aug 03 '22 12:08 benoit-cty

Is anyone able to provide a stacktrace of this issue? I suspect https://github.com/unit8co/darts/pull/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 avatar Aug 08 '22 11:08 hrzn