[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #LLO-424423]: problem with metpy importing modules



Hello, and thanks for reaching out!

The first question: do you have any files in your project directory with the 
name `array.py`? If so, this is taking priority over necessary files within 
other packages in your environment. Rename the file to something less likely to 
be in use by another library, and your error should go away!

If you do not have this file or any other files present that might be 
interrupting (eg `pyproj.py`, `xarray.py`, etc.), then can you follow up with 
more information about your environment? You can provide the outputs of `conda 
info` and `conda list`, as well as a list of files in your project directory, 
to make this process smoother. Thanks, and I hope this helps! Don't hesitate to 
follow up if needed.


All the best,

Drew


> import metpy.calc as mpcalc
> 
> an error is returned:
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File 
> "/Users//opt/miniconda3/envs/metenv/lib/python3.10/site-packages/metpy/__init__.py",
>  line 35, in <module>
> from .xarray import *  # noqa: F401, F403, E402
> File 
> "/Users//opt/miniconda3/envs/metenv/lib/python3.10/site-packages/metpy/xarray.py",
>  line 27, in <module>
> from pyproj import CRS, Proj
> File 
> "/Users//opt/miniconda3/envs/metenv/lib/python3.10/site-packages/pyproj/__init__.py",
>  line 49, in <module>
> import pyproj.network
> File 
> "/Users//opt/miniconda3/envs/metenv/lib/python3.10/site-packages/pyproj/network.py",
>  line 10, in <module>
> from pyproj._network import (  # noqa: F401 pylint: disable=unused-import
> File "pyproj/_network.pyx", line 1, in init pyproj._network
> AttributeError: module 'array' has no attribute 'array'
> 


Ticket Details
===================
Ticket ID: LLO-424423
Department: Support Python
Priority: Low
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.