home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 951644054

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
951644054 MDU6SXNzdWU5NTE2NDQwNTQ= 5631 NameError: name '_DType_co' is not defined 1328158 closed 0     7 2021-07-23T14:44:19Z 2021-07-23T21:39:54Z 2021-07-23T18:50:39Z NONE      

What happened: I installed a package that has xarray as a dependency. I then ran the package's console script, which resulted in the NameError shown below.

What you expected to happen: Successful import of the xarray package.

Minimal Complete Verifiable Example: ```python $ conda create -n tstenv python=3.7 $ conda activate tstenv (tstenv) $ pip install climate-indices (tstenv) $ python

import xarray Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/james/miniconda3/envs/tstenv/lib/python3.7/site-packages/xarray/init.py", line 3, in <module> from . import testing, tutorial, ufuncs File "/home/james/miniconda3/envs/tstenv/lib/python3.7/site-packages/xarray/testing.py", line 8, in <module> from xarray.core import duck_array_ops, formatting, utils File "/home/james/miniconda3/envs/tstenv/lib/python3.7/site-packages/xarray/core/duck_array_ops.py", line 16, in <module> from . import dask_array_compat, dask_array_ops, dtypes, npcompat, nputils File "/home/james/miniconda3/envs/tstenv/lib/python3.7/site-packages/xarray/core/npcompat.py", line 81, in <module> from numpy.typing import ArrayLike, DTypeLike File "/home/james/miniconda3/envs/tstenv/lib/python3.7/site-packages/numpy/typing/init.py", line 316, in <module> from ._dtype_like import ( File "/home/james/miniconda3/envs/tstenv/lib/python3.7/site-packages/numpy/typing/_dtype_like.py", line 95, in <module> class _SupportsDType(Generic[_DType_co]): ```

Anything else we need to know?: This does not happen if I just install xarray, so there seems to be a conflict with another dependency package at play here. Are there methods for finding namespace conflicts like this without resorting to a "manual" method of trying all the various combinations? It seems that I've included a version of another package in my requirements that has a namespace conflict with xarray -- how can I work out which this is? Or maybe a simpler solution is to not use specific versions in the requirements.txt of the package and instead let conda work out the correct/latest versions?

Thanks in advance for any ideas on where to look to resolve this issue (and in general for all the work that goes into xarray's care and feeding).

Environment: Linux (Ubuntu 20.04) Anaconda, Python 3.7 ``` $ conda list xarray

packages in environment at /home/james/miniconda3/envs/tstenv:

Name Version Build Channel

xarray 0.18.2 pypi_0 pypi ```

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5631/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 7 rows from issue in issue_comments
Powered by Datasette · Queries took 0.583ms · About: xarray-datasette