Stacy
Stacy

Reputation: 43

metpy import issue in Debian 10

I am running python3 on a Debian 10 (buster) system.

Up until yesterday, I was able to perform this import:

from metpy.plots import (StationPlot, StationPlotLayout, wx_code_map, current_weather)

After a general package update, I can no longer perform the import and instead get this string of errors:

Traceback (most recent call last): File "/home/disk/bob/impacts/bin/ASOS_plot_data_hourly_ISU.py", line 37, in from metpy.plots import (StationPlot, StationPlotLayout, wx_code_map, current_weather) File "/usr/lib/python3/dist-packages/metpy/init.py", line 35, in from .xarray import * # noqa: F401, F403, E402 File "/usr/lib/python3/dist-packages/metpy/xarray.py", line 27, in from .units import DimensionalityError, UndefinedUnitError, units File "/usr/lib/python3/dist-packages/metpy/units.py", line 40, in lambda string: string.replace('%', 'percent') File "/usr/lib/python3/dist-packages/pint/registry.py", line 74, in call obj = super(_Meta, self).call(*args, **kwargs) TypeError: init() got an unexpected keyword argument 'preprocessors'

In fact, I can't even do a simple

import metpy

without getting the same error chain.

Obviously, there must be some sort of version discrepancy with xarray or some other package.

I currently have these versions installed: 1.0.0rc1.po of metpy and 0.12.1-1 of xarray.

Any thoughts about what the required combination of packages should be or who I might ask about this?

Upvotes: 1

Views: 127

Answers (1)

DopplerShift
DopplerShift

Reputation: 5843

It's unclear from your post what versions of Pint and Python you have installed. From the error, it seems like you are having problems with too old a version of Pint installed, though MetPy 1.0.0rc1 should have had support to deal with that. Really, the whole 1.0.0rc1.po version makes me wonder almost if MetPy was installed from git at some point after rc1?

Regardless, MetPy 1.0.0rc1, which means that was the first Release Candidate for the 1.0 release of MetPy and is not a version I would rely upon. I would suggest updating to either MetPy 1.0.1 (if you are using Python 3.6) or MetPy 1.2 (for Python >= 3.7).

Upvotes: 2

Related Questions