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

cf-units is a required dependency #54

Closed
magnusuMET opened this issue Oct 30, 2024 · 0 comments · Fixed by #55
Closed

cf-units is a required dependency #54

magnusuMET opened this issue Oct 30, 2024 · 0 comments · Fixed by #55
Assignees
Milestone

Comments

@magnusuMET
Copy link
Collaborator

magnusuMET commented Oct 30, 2024

cf-units is specified as an optional dependency, but is required: Not having this package installed will give a

NameError: name `Unit` is not defined

when importing pyaro

Error message
>>> import pyaro
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/magnusu/Projects/github/metno/pyaro-readers/venv/lib/python3.10/site-packages/pyaro/__init__.py", line 5, in <module>
    from .plugins import list_timeseries_engines, open_timeseries
  File "/home/magnusu/Projects/github/metno/pyaro-readers/venv/lib/python3.10/site-packages/pyaro/plugins.py", line 10, in <module>
    from .timeseries.Engine import Engine as TimeseriesEngine
  File "/home/magnusu/Projects/github/metno/pyaro-readers/venv/lib/python3.10/site-packages/pyaro/timeseries/__init__.py", line 3, in <module>
    from .Reader import Reader
  File "/home/magnusu/Projects/github/metno/pyaro-readers/venv/lib/python3.10/site-packages/pyaro/timeseries/Reader.py", line 4, in <module>
    from .Filter import Filter, filters
  File "/home/magnusu/Projects/github/metno/pyaro-readers/venv/lib/python3.10/site-packages/pyaro/timeseries/Filter.py", line 870, in <module>
    class RelativeAltitudeFilter(StationFilter):
  File "/home/magnusu/Projects/github/metno/pyaro-readers/venv/lib/python3.10/site-packages/pyaro/timeseries/Filter.py", line 877, in RelativeAltitudeFilter
    UNITS_METER = Unit("m")
NameError: name 'Unit' is not defined
@heikoklein heikoklein self-assigned this Oct 30, 2024
@heikoklein heikoklein added this to the m2024-11 milestone Oct 30, 2024
@heikoklein heikoklein linked a pull request Oct 30, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants