home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 244510329

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/990#issuecomment-244510329 https://api.github.com/repos/pydata/xarray/issues/990 244510329 MDEyOklzc3VlQ29tbWVudDI0NDUxMDMyOQ== 296686 2016-09-02T23:35:24Z 2016-09-02T23:35:24Z CONTRIBUTOR

Oops yes, sorry!

I'm having a bit of an issue with changing the strings to constants (which, by the way, I completely agree is how it should be done). I've defined the constants in backends/api.py and am then trying to import them in core/dataarray.py.

I am doing the import as:

from ..backends import DATAARRAY_NAME, DATAARRAY_VARIABLE

But this gives me the following error:

../../anaconda3/lib/python3.5/site-packages/py/_path/local.py:650: in pyimport __import__(modname) xarray/__init__.py:3: in <module> from .core.extensions import (register_dataarray_accessor, xarray/core/extensions.py:3: in <module> from .dataarray import DataArray xarray/core/dataarray.py:9: in <module> from ..backends import DATAARRAY_NAME, DATAARRAY_VARIABLE xarray/backends/__init__.py:8: in <module> from .netCDF4_ import NetCDF4DataStore xarray/backends/netCDF4_.py:6: in <module> from .. import Variable E ImportError: cannot import name 'Variable'

It seems like my relative import is somehow mucking up another relative import inside the netCDF4 stuff. Do you have any ideas how I can solve this? Am I just doing my imports wrong?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  173632183
Powered by Datasette · Queries took 159.488ms · About: xarray-datasette