darts
darts copied to clipboard
TypeError: <class 'numpy.typing._dtype_like._SupportsDType'> is not a generic class]
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 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
Same issue. Can't use darts.

The problem appears to be from xarray, as xarray have updated their package as in https://pypi.org/project/xarray/#history
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?
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)
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.
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
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?
pip install xarray==0.20.2
Worked for me, today is a good day.
Hi, I'm not sure how to reproduce, and whether this is an issue with Darts.
import pyspedas from pytplot import tplotis 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
pip install xarray==0.20.2 This worked for me too! Thank you so much!
pip install xarray==0.20.2Worked for me, today is a good day.
I have run into the same issue and this comment from @OmarHory worked for me too
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!
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.
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).