Skip to content

default_turbine_data missing in installer #119

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

Closed
maurerle opened this issue Nov 26, 2021 · 1 comment · Fixed by #133
Closed

default_turbine_data missing in installer #119

maurerle opened this issue Nov 26, 2021 · 1 comment · Fixed by #133

Comments

@maurerle
Copy link
Contributor

The default_turbine_data is missing in the installer.
Also: I get an error when downloading the latest wind turbine data:

>>> from windpowerlib.data import store_turbine_data_from_oedb, fetch_turbine_data_from_oedb
>>> df = store_turbine_data_from_oedb()
/opt/conda/envs/dmas/lib/python3.9/site-packages/windpowerlib/oedb/power_curves.csv
Traceback (most recent call last):
  File "/opt/conda/envs/dmas/lib/python3.9/site-packages/windpowerlib/data.py", line 252, in check_turbine_data
    data = check_data_integrity(filename)
  File "/opt/conda/envs/dmas/lib/python3.9/site-packages/windpowerlib/data.py", line 269, in check_data_integrity
    wt = WindTurbine(**turbine_data_set)
  File "/opt/conda/envs/dmas/lib/python3.9/site-packages/windpowerlib/wind_turbine.py", line 142, in __init__
    self.power_curve = get_turbine_data_from_file(
  File "/opt/conda/envs/dmas/lib/python3.9/site-packages/windpowerlib/wind_turbine.py", line 408, in get_turbine_data_from_file
    wpp_df["wind_speed"] = wpp_df["wind_speed"].apply(lambda x: float(x))
  File "/opt/conda/envs/dmas/lib/python3.9/site-packages/pandas/core/series.py", line 4357, in apply
    return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
  File "/opt/conda/envs/dmas/lib/python3.9/site-packages/pandas/core/apply.py", line 1043, in apply
    return self.apply_standard()
  File "/opt/conda/envs/dmas/lib/python3.9/site-packages/pandas/core/apply.py", line 1098, in apply_standard
    mapped = lib.map_infer(
  File "pandas/_libs/lib.pyx", line 2859, in pandas._libs.lib.map_infer
  File "/opt/conda/envs/dmas/lib/python3.9/site-packages/windpowerlib/wind_turbine.py", line 408, in <lambda>
    wpp_df["wind_speed"] = wpp_df["wind_speed"].apply(lambda x: float(x))
ValueError: could not convert string to float: '7.0.1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/envs/dmas/lib/python3.9/site-packages/windpowerlib/data.py", line 246, in store_turbine_data_from_oedb
    check_turbine_data(filename)
  File "/opt/conda/envs/dmas/lib/python3.9/site-packages/windpowerlib/data.py", line 254, in check_turbine_data
    restore_default_turbine_data()
  File "/opt/conda/envs/dmas/lib/python3.9/site-packages/windpowerlib/data.py", line 309, in restore_default_turbine_data
    for file in os.listdir(src_path):
FileNotFoundError: [Errno 2] No such file or directory: '/opt/conda/envs/dmas/lib/python3.9/site-packages/windpowerlib/data/default_turbine_data'
@maurerle
Copy link
Contributor Author

This is still relevant with latest version an python 3.11 - seems like the data folder is not shipped in the pip release?

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.

1 participant