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

Issue attempting to import Windspharm in script #112

Open
Jking255 opened this issue Mar 17, 2020 · 2 comments
Open

Issue attempting to import Windspharm in script #112

Jking255 opened this issue Mar 17, 2020 · 2 comments

Comments

@Jking255
Copy link

Jking255 commented Mar 17, 2020

Hi,

Looking forward to using this package, thanks for developing! As a first run through to check everything works (having installed Windspharm in my Conda environment), I'm attempting to run the example standard interface streamfunction/velocity potential script with some of my own data. An error is thrown up which looks like a problem in the interaction with Xarray:

Traceback (most recent call last):
  File "windspharm_example.py", line 21, in <module>
    from windspharm.standard import VectorWind
  File "/ouce-home/students/sedm4616/.conda/envs/jk_venv/lib/python2.7/site-packages/windspharm/__init__.py", line 49, in <module>
    from . import xarray
  File "/ouce-home/students/sedm4616/.conda/envs/jk_venv/lib/python2.7/site-packages/windspharm/xarray.py", line 24, in <module>
    import xarray as xr
  File "/ouce-home/students/sedm4616/.conda/envs/jk_venv/lib/python2.7/site-packages/xarray/__init__.py", line 10, in <module>
    from .core.alignment import align, broadcast, broadcast_arrays
  File "/ouce-home/students/sedm4616/.conda/envs/jk_venv/lib/python2.7/site-packages/xarray/core/alignment.py", line 11, in <module>
    from .indexing import get_indexer_nd
  File "/ouce-home/students/sedm4616/.conda/envs/jk_venv/lib/python2.7/site-packages/xarray/core/indexing.py", line 11, in <module>
    from . import duck_array_ops, nputils, utils
  File "/ouce-home/students/sedm4616/.conda/envs/jk_venv/lib/python2.7/site-packages/xarray/core/duck_array_ops.py", line 22, in <module>
    from . import dask_array_compat
  File "/ouce-home/students/sedm4616/.conda/envs/jk_venv/lib/python2.7/site-packages/xarray/core/dask_array_compat.py", line 47, in <module>
    AxisError = np.AxisError
AttributeError: 'module' object has no attribute 'AxisError'

Any advice on this would be very much appreciated.

Best,

James

@ajdawson
Copy link
Owner

Windspharm tries to import all available interfaces when it is first loaded. It looks like you have xarray installed so it is trying to import it but failing. Are you able to import xarray on its own?

import xarray

@Jking255
Copy link
Author

Hi,

This does now seem to work, after a complete update of all the packages in my Conda environment.

Thanks,

James

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants