Skip to content

bug: ___kmpc_for_static_fini #32

@peterdudfield

Description

@peterdudfield

ImportError Traceback (most recent call last)
Cell In[1], line 8
5 site = PVSite(latitude=51.75, longitude=-1.25, capacity_kwp=1.25)
7 # run model, uses ICON NWP data by default
----> 8 predictions_df = run_forecast(site=site, ts='2023-11-01')

File ~/.pyenv/versions/3.11.2/lib/python3.11/site-packages/quartz_solar_forecast/forecast.py:31, in run_forecast(site, ts, nwp_source)
28 pv_xr = make_pv_data(site=site, ts=ts)
30 # load and run models
---> 31 pred_df = forecast_v1(nwp_source, nwp_xr, pv_xr, ts)
33 return pred_df

File ~/.pyenv/versions/3.11.2/lib/python3.11/site-packages/quartz_solar_forecast/forecasts/v1.py:20, in forecast_v1(nwp_source, nwp_xr, pv_xr, ts, model)
13 """
14 Run the forecast
15
16 This runs the pv-site-prediction model from the psp library.
17 """
19 if model is None:
---> 20 model = load_model(f"{dir_path}/../models/model-0.3.0.pkl")
22 # format pv and nwp data
23 pv_data_source = NetcdfPvDataSource(
24 pv_xr,
25 id_dim_name="pv_id",
(...)
28 ignore_pv_ids=[],
29 )

File ~/.pyenv/versions/3.11.2/lib/python3.11/site-packages/psp/serialization.py:25, in load_model(filepath)
22 def load_model(filepath: pathlib.Path | str) -> PvSiteModel:
23 # Use fsspec to support loading models from the cloud, using paths like "s3://..".
24 with fsspec.open(str(filepath), "rb") as f:
---> 25 (cls, attrs) = pickle.load(f)
27 model = cls.new(cls)
28 model.set_state(attrs)

File ~/.pyenv/versions/3.11.2/lib/python3.11/site-packages/psp/models/recent_history.py:13
11 from psp.data_sources.nwp import NwpDataSource
12 from psp.data_sources.pv import PvDataSource
---> 13 from psp.data_sources.satellite import SatelliteDataSource
14 from psp.models.base import PvSiteModel, PvSiteModelConfig
15 from psp.models.regressors.base import Regressor

File ~/.pyenv/versions/3.11.2/lib/python3.11/site-packages/psp/data_sources/satellite.py:1
----> 1 import pyresample
2 import xarray as xr
4 from psp.data_sources.nwp import NwpDataSource

File ~/.pyenv/versions/3.11.2/lib/python3.11/site-packages/pyresample/init.py:27
25 from pyresample import geometry # noqa
26 from pyresample import grid # noqa
---> 27 from pyresample import image # noqa
28 from pyresample import kd_tree # noqa
29 from pyresample import plot # noqa

File ~/.pyenv/versions/3.11.2/lib/python3.11/site-packages/pyresample/image.py:26
22 import warnings
24 import numpy as np
---> 26 from pyresample import geometry, grid, kd_tree
29 class ImageContainer(object):
30 """Holds image with geometry definition. Allows indexing with linesample arrays.
31
32 Parameters
(...)
54 Number of processor cores to be used for geometry operations
55 """

File ~/.pyenv/versions/3.11.2/lib/python3.11/site-packages/pyresample/kd_tree.py:31
28 from logging import getLogger
30 import numpy as np
---> 31 from pykdtree.kdtree import KDTree
33 from pyresample import CHUNK_SIZE, _spatial_mp, data_reduce, geometry
35 from .future.resamplers._transform_utils import lonlat2xyz

ImportError: dlopen(/Users/xxx/.pyenv/versions/3.11.2/lib/python3.11/site-packages/pykdtree/kdtree.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '___kmpc_for_static_fini'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions