ha-solcast-solar: Service "Not loaded" v4.0.38 because unable to install scipy dependency
The problem
I updated this morning to v4.0.38, and restarted HA as prompted. Now the Solcast integration appears as “not loaded”
I also get this log entry:
Log Details (ERROR)
Logger: homeassistant.setup
Source: setup.py:271
First occurred: 09:38:36 (1 occurrences)
Last logged: 09:38:36
Setup failed for custom integration 'solcast_solar': Requirements for solcast_solar not found: ['scipy>=1.0.0'].
I noticed the mention of “scipy”, which also appears elsewhere in my logs:
Logger: homeassistant.util.package
Source: util/package.py:123
First occurred: 09:34:33 (3 occurrences)
Last logged: 09:38:36
Unable to install package scipy>=1.0.0: error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [34 lines of output] Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-ewt7ypug/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 1020, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-ewt7ypug/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 1073, in build_wheel with _project(config_settings) as project: File "/usr/local/lib/python3.12/contextlib.py", line 137, in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ File "/tmp/pip-build-env-ewt7ypug/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 947, in _project yield Project(source_dir, build_dir, meson_args, editable_verbose) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-ewt7ypug/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 662, in __init__ self._meson = _get_meson_command(pyproject_config.get('meson')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-ewt7ypug/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 982, in _get_meson_command meson_version = subprocess.run(cmd + ['--version'], check=False, text=True, capture_output=True).stdout ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/subprocess.py", line 548, in run with Popen(*popenargs, **kwargs) as process: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/subprocess.py", line 1026, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.12/subprocess.py", line 1955, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: 'meson' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
Unable to install package scipy>=1.0.0: error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [34 lines of output] Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-trbe6431/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 1020, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-trbe6431/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 1073, in build_wheel with _project(config_settings) as project: File "/usr/local/lib/python3.12/contextlib.py", line 137, in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ File "/tmp/pip-build-env-trbe6431/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 947, in _project yield Project(source_dir, build_dir, meson_args, editable_verbose) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-trbe6431/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 662, in __init__ self._meson = _get_meson_command(pyproject_config.get('meson')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-trbe6431/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 982, in _get_meson_command meson_version = subprocess.run(cmd + ['--version'], check=False, text=True, capture_output=True).stdout ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/subprocess.py", line 548, in run with Popen(*popenargs, **kwargs) as process: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/subprocess.py", line 1026, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.12/subprocess.py", line 1955, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: 'meson' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
Unable to install package scipy>=1.0.0: error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [34 lines of output] Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-3cnmixjj/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 1020, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-3cnmixjj/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 1073, in build_wheel with _project(config_settings) as project: File "/usr/local/lib/python3.12/contextlib.py", line 137, in __enter__ return next(self.gen) ^^^^^^^^^^^^^^ File "/tmp/pip-build-env-3cnmixjj/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 947, in _project yield Project(source_dir, build_dir, meson_args, editable_verbose) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-3cnmixjj/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 662, in __init__ self._meson = _get_meson_command(pyproject_config.get('meson')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-3cnmixjj/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 982, in _get_meson_command meson_version = subprocess.run(cmd + ['--version'], check=False, text=True, capture_output=True).stdout ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/subprocess.py", line 548, in run with Popen(*popenargs, **kwargs) as process: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/subprocess.py", line 1026, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.12/subprocess.py", line 1955, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: 'meson' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
What version of Solcast Integration has the issue?
v4.0.38
What version of Home Assistant are you using?
HA Core 2024.7.2
Diagnostics information
Not possible
Logs debug/info/error output
See above
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 40 (1 by maintainers)
Commits related to this issue
- Remove scipy dependency #85 — committed to BJReplay/ha-solcast-solar by autoSteve 2 years ago
- Cope with new options #85 — committed to BJReplay/ha-solcast-solar by autoSteve 2 years ago
Great work, GitHub.
What I said over in #87 is…
FYI, v4.0.39 draft release is primed and ready, which will end the alpha, and switch back to the @BJReplay repo. More to come.
Unless anyone has grievances to report…
Given the whole CrowdStrike thing you’ll forgive me for delaying for about ten hours while I sleep and then double check all work with fresh eyes… You Europeans will be tucked up in bed by that time, so it’ll probably be there when you wake up much later…
Reverting to the BJReplay repo in HACS is straightforward, as noted in the original post #87, except that will download v4.0.31. Choose to re-download, and select v4.0.39 after I pull the trigger. Then restart HA.
Lemme know if there are any issues doing so.
I’ll advise here when v4.0.39 is up at BJReplay.
BTW, I will be “out-of-office” for a week come tomorrow. I’m heading to Tokyo to rubberneck at stuff, and hang out in odd bars, so responses may be delayed depending on how good the rubbernecking is. I’m tipping the rubbernecking will be epic. (Did someone say MARIO CARTS through the streets of Tokyo??? SEND IT!!!)
#84, #85, and more.
(787 SYD-HND squooshy front seats, so will have Wifi on the aircraft untill I land and totally focus on me. I rarely sleep on aircraft, so you’ll prolly get me. That is, assuming QF have not succumbed to much BSODs preventing me leaving, which is looking okay. Too smart, or too cheap to CrowdStrike? I’ll take either, which worries this IT nerd just a little bit, but a bit less today given the circumstances…)
Same issue, also on RPI. Went back to 4.0.37 and all OK.
Is everyone hitting this running on a RPi?
I am seeing the same error. Just confirming this is not a single system issue.
Alpha 2 works for me also (RPI). Alpha1 did not work.
Thanks!
On Wed, 17 Jul 2024 at 16:27, ladaan @.***> wrote:
Now it works. Thank you.
I’m blind from that info, @Godzillahu. I can’t tell you much.
But what I can definitely tell you is that it is not the same issue as this one if you installed the alpha v4.0.39. That code does not carry a dependency on scipy, so it cannot be the same issue… The alpha is designed to solve this issue, and nearly made my math brain explode in the process of building it.
Please open a new issue, and with debug logging enabled so you can include that detail so I can see what’s really going on in your case.
Good to hear, @ladaan.
You didn’t need to remove the integration. Just switch repos and re-download, and all config would have carried over.
Issue on my side. Once the solcast was removed and added again from this repo, the solcast was not enabled in Energy dashboard, Solar Panels section.
In the next release (most likely) the use of scipy/numpy has been retired. The last thing I want to see is less reliability, so old school math for the win.
Some of the other changes that I am proposing for that release are very much worthy of an alpha test, as they add new configuration capabilities. This math change will also be in the payload of that alpha. If anyone would like to participate, round up the discussion topic that I will create in a little while, once my testing is done.
Running on Docker (On Ubuntu 22.04 on WSL)
Upgraded from my phone. Why not live dangerously? 💣
No issues. 🤷
Thanks for that. I’m thinking of pulling down v4.0.38 unless I can come up with something reasonably quickly.
It’s why we have betas…
Just here to add a “me too” to the issue (so you can monitor occurances)…running Core 2024.7.2 with HAOS on Pi5 and seeing the unable to install scipy error entries in the logs as mentioned above.
I installed v4.0.38 last night, loaded absolutely fine, nothing untoward in the logfile and its been through 3 scheduled solar updates from Solcast, the last one had one auto-retry, but then succeeded. Nothing bad showing on my side.
Not had a chance to try the new branch you’ve created for #84 yet @autoSteve but the main beta is fine for me