Requirements #115
Unanswered
marcidifra
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to use the API on Databricks, where I have manually installed the libraries required by the API since I can't find a requirements file. However i get an error when running the run_weather_api demo about not finding the ecCodes library, even though i have installed it on my cluster. Could help me out?
RuntimeError Traceback (most recent call last)
File :9
6 from dateutil.relativedelta import relativedelta
8 from weather_provider_api.routers.weather.api_models import OutputUnit
----> 9 from weather_provider_api.routers.weather.controller import WeatherController
11 get_ipython().run_line_magic('matplotlib', 'inline')
12 from IPython.display import set_matplotlib_formats
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /Workspace/Repos/[email protected]/weather-provider-api/weather_provider_api/routers/weather/controller.py:20
18 from weather_provider_api.routers.weather.exceptions import UnknownModelException, UnknownSourceException
19 from weather_provider_api.routers.weather.sources.cds.cds import CDS
---> 20 from weather_provider_api.routers.weather.sources.knmi.knmi import KNMI
21 from weather_provider_api.routers.weather.utils.geo_position import GeoPosition
24 class WeatherController(object): # pragma: no cover
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /Workspace/Repos/[email protected]/weather-provider-api/weather_provider_api/routers/weather/sources/knmi/knmi.py:17
11 from weather_provider_api.routers.weather.sources.knmi.models.actuele_waarnemingen_register import (
12 ActueleWaarnemingenRegisterModel,
13 )
14 from weather_provider_api.routers.weather.sources.knmi.models.daggegevens import (
15 DagGegevensModel,
16 )
---> 17 from weather_provider_api.routers.weather.sources.knmi.models.harmonie_arome import (
18 HarmonieAromeModel,
19 )
20 from weather_provider_api.routers.weather.sources.knmi.models.pluim import PluimModel
21 from weather_provider_api.routers.weather.sources.knmi.models.uurgegevens import (
22 UurgegevensModel,
23 )
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /Workspace/Repos/[email protected]/weather-provider-api/weather_provider_api/routers/weather/sources/knmi/models/harmonie_arome.py:18
15 import xarray as xr
17 from weather_provider_api.routers.weather.base_models.model import WeatherModelBase
---> 18 from weather_provider_api.routers.weather.sources.knmi.client.arome_repository import HarmonieAromeRepository
19 from weather_provider_api.routers.weather.sources.knmi.knmi_factors import arome_factors
20 from weather_provider_api.routers.weather.utils.date_helpers import validate_begin_and_end
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /Workspace/Repos/[email protected]/weather-provider-api/weather_provider_api/routers/weather/sources/knmi/client/arome_repository.py:15
12 from pathlib import Path
13 from typing import List, Tuple
---> 15 import cfgrib
16 import numpy as np
17 import pandas as pd
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/cfgrib/init.py:20
18 # cfgrib core API depends on the ECMWF ecCodes C-library only
19 from .abc import Field, Fieldset, Index, MappingFieldset
---> 20 from .cfmessage import COMPUTED_KEYS
21 from .dataset import (
22 Dataset,
23 DatasetBuildError,
(...)
27 open_from_index,
28 )
29 from .messages import FieldsetIndex, FileStream, Message
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/cfgrib/cfmessage.py:29
26 import attr
27 import numpy as np
---> 29 from . import abc, messages
31 LOG = logging.getLogger(name)
33 # taken from eccodes stepUnits.table
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/cfgrib/messages.py:28
25 import typing as T
27 import attr
---> 28 import eccodes # type: ignore
29 import numpy as np
31 from . import abc
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/eccodes/init.py:13
1 #
2 # (C) Copyright 2017- ECMWF.
3 #
(...)
10 #
11 #
---> 13 from .eccodes import * # noqa
14 from .highlevel import *
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/eccodes/eccodes.py:12
1 #
2 # (C) Copyright 2017- ECMWF.
3 #
(...)
10 #
11 #
---> 12 from gribapi import (
13 CODES_PRODUCT_ANY,
14 CODES_PRODUCT_BUFR,
15 CODES_PRODUCT_GRIB,
16 CODES_PRODUCT_GTS,
17 CODES_PRODUCT_METAR,
18 )
19 from gribapi import GRIB_CHECK as CODES_CHECK
20 from gribapi import GRIB_MISSING_DOUBLE as CODES_MISSING_DOUBLE
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/gribapi/init.py:13
1 #
2 # (C) Copyright 2017- ECMWF.
3 #
(...)
10 #
11 #
---> 13 from .gribapi import * # noqa
14 from .gribapi import version, lib
16 # The minimum recommended version for the ecCodes package
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/gribapi/gribapi.py:34
30 from functools import wraps
32 import numpy as np
---> 34 from gribapi.errors import GribInternalError
36 from . import errors
37 from .bindings import ENC
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/gribapi/errors.py:16
1 #
2 # (C) Copyright 2017- ECMWF.
3 #
(...)
9 # does it submit to any jurisdiction.
10 #
12 """
13 Exception class hierarchy
14 """
---> 16 from .bindings import ENC, ffi, lib
19 class GribInternalError(Exception):
20 """
21 @brief Wrap errors coming from the C API in a Python exception object.
22
23 Base class for all exceptions
24 """
File /databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/init.py:171, in _create_import_patch..import_patch(name, globals, locals, fromlist, level)
166 thread_local._nest_level += 1
168 try:
169 # Import the desired module. If you’re seeing this while debugging a failed import,
170 # look at preceding stack frames for relevant error information.
--> 171 original_result = python_builtin_import(name, globals, locals, fromlist, level)
173 is_root_import = thread_local._nest_level == 1
174 #
level
represents the number of leading dots in a relative import statement.175 # If it's zero, then this is an absolute import.
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/gribapi/bindings.py:35
33 library_path = findlibs.find("eccodes")
34 if library_path is None:
---> 35 raise RuntimeError("Cannot find the ecCodes library")
37 # default encoding for ecCodes strings
38 ENC = "ascii"
RuntimeError: Cannot find the ecCodes library
Beta Was this translation helpful? Give feedback.
All reactions