-
Notifications
You must be signed in to change notification settings - Fork 406
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
TypeError when importing metpy.calc #1305
Comments
I have another machine with python 3.7.4 and metpy 0.10.2 and it is also reporting the same error. |
Sounds like in those other environments, it’s pulling in a new version of pint (0.10.x), which is causing the problems. I expect MetPy 0.12 is the only one to work with that version of pint. MetPy 0.12 bumped required versions of some dependencies. That may be why it won’t automatically update. At any rate, given that the latest version of MetPy works, and the breakage seems to be induced but the latest Pint, I don’t see anything for us to fix in MetPy so I’m closing. Feel free to re-open if you think there’s something I’m missing. |
Hi Ryan, Any idea what the conflict may be? It's not that important. To run: To anyone with future problems.... I needed to: |
@allenea Did
|
TypeError Traceback (most recent call last)
in
----> 1 import metpy.calc as mpcalc
~/.conda/envs/work_env_mali/lib/python3.7/site-packages/metpy/calc/init.py in
5
6 from .basic import * # noqa: F403
----> 7 from .cross_sections import * # noqa: F403
8 from .indices import * # noqa: F403
9 from .kinematics import * # noqa: F403
~/.conda/envs/work_env_mali/lib/python3.7/site-packages/metpy/calc/cross_sections.py in
12
13 from .basic import coriolis_parameter
---> 14 from .tools import first_derivative
15 from ..package_tools import Exporter
16 from ..xarray import check_axis, check_matching_coordinates
~/.conda/envs/work_env_mali/lib/python3.7/site-packages/metpy/calc/tools.py in
104 @preprocess_xarray
105 @units.wraps(('=A', '=B'), ('=A', '=B', '=B'))
--> 106 def find_intersections(x, a, b, direction='all', log_x=False):
107 """Calculate the best estimate of intersection.
108
~/.conda/envs/work_env_mali/lib/python3.7/site-packages/pint/registry_helpers.py in decorator(func)
246 raise TypeError(
247 "%s takes %i parameters, but %i units were passed"
--> 248 % (func.name, count_params, len(args))
249 )
250
TypeError: find_intersections takes 5 parameters, but 3 units were passed
Which platform: Linux
python --version
Python 3.7.4conda list | grep metpy
metpy 0.11.0 py37_0 conda-forge
*
conda version
: 4.7.12The text was updated successfully, but these errors were encountered: