pantherale0 / ha-fuelprices

A generic and extensible integration with pyfuelprices to retrieve local (or remote) fuel price data.
MIT License
16 stars 2 forks source link

reverse-geocode wont install on pi 4 #13

Closed si458 closed 2 months ago

si458 commented 5 months ago

System Health details

System Information

version core-2024.3.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.1.73-haos-raspi
arch aarch64
timezone Europe/London
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4858 Installed Version | 1.34.0 Stage | running Available Repositories | 1405 Downloaded Repositories | 19
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.1 -- | -- update_channel | stable supervisor_version | supervisor-2024.03.0 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 57.3 GB disk_used | 23.1 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Duck DNS (1.16.0), Mosquitto broker (6.4.0), WireGuard (0.10.2), Advanced SSH & Web Terminal (17.2.0), File editor (5.8.0), ESPHome (2024.3.0), Speedtest (1.5.0), Log Viewer (0.17.0), Zigbee2MQTT (1.36.0-1), Whisper (2.0.0), Piper (1.5.0), Portainer (2.20.0), Neolink (Dev) (0.0.1), HassOS I2C Configurator (0.13a), I2C OLED Display (1.0.5), pigpio (1.5.2), Epic Games Free (debian-2024-03-17)
Dashboards dashboards | 4 -- | -- resources | 8 views | 18 mode | storage
Recorder oldest_recorder_run | 21 March 2024 at 21:27 -- | -- current_recorder_run | 25 March 2024 at 12:53 estimated_db_size | 392.09 MiB database_engine | sqlite database_version | 3.44.2

Checklist

Describe the issue

unable to setup/add integration

Reproduction steps

  1. install fuel_prices via hacs
  2. try adding via intergrations

Debug logs

2024-03-25 12:56:46.061 ERROR (SyncWorker_26) [homeassistant.util.package] Unable to install package reverse-geocode==1.4.1: 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 
          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-vuqvwde1/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 985, in wrapper
          return func(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vuqvwde1/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 1038, 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-vuqvwde1/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 912, in _project
          yield Project(source_dir, build_dir, meson_args, editable_verbose)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vuqvwde1/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 635, in __init__
          self._meson = _get_meson_command(pyproject_config.get('meson'))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-vuqvwde1/overlay/lib/python3.12/site-packages/mesonpy/__init__.py", line 947, 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 1953, 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.
2024-03-25 12:56:46.061 INFO (SyncWorker_26) [homeassistant.util.package] Attempting install of reverse-geocode==1.4.1

Diagnostics dump

2024-03-25 12:56:46.061 ERROR (SyncWorker_26) [homeassistant.util.package] Unable to install package reverse-geocode==1.4.1: 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 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-vuqvwde1/overlay/lib/python3.12/site-packages/mesonpy/init.py", line 985, in wrapper return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-vuqvwde1/overlay/lib/python3.12/site-packages/mesonpy/init.py", line 1038, 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-vuqvwde1/overlay/lib/python3.12/site-packages/mesonpy/init.py", line 912, in _project yield Project(source_dir, build_dir, meson_args, editable_verbose) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-vuqvwde1/overlay/lib/python3.12/site-packages/mesonpy/init.py", line 635, in init self._meson = _get_meson_command(pyproject_config.get('meson')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-vuqvwde1/overlay/lib/python3.12/site-packages/mesonpy/init.py", line 947, 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 1953, 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. 2024-03-25 12:56:46.061 INFO (SyncWorker_26) [homeassistant.util.package] Attempting install of reverse-geocode==1.4.1

Namirred commented 5 months ago

I have the same issue. I'm using a pi 5

pantherale0 commented 4 months ago

Hi,

I've not tested on an RPI, reverse_geocode is required for the other countries this integration supports. Looks like an update is available to 1.6 though so will see if I can bump the dependancies.

Sorry for the long response, due to personal commitements and work I've been unable to give this project as much love as I would have liked to.

davidanderle commented 3 months ago

I am having the same issue on Home Assistant Green on HA Core 2024.6.1

pantherale0 commented 2 months ago

Should be fixed in next release (related commit https://github.com/pantherale0/pyfuelprices/commit/ab8861cd70c9995e25354fb47b66e8eefb49df4f)

I've removed this dependency altogether although that does mean queries will take slightly longer as we have to go to OpenStreetMaps first.

si458 commented 2 months ago

Brilliant! Just need to wait for a new update/release now :)

pantherale0 commented 2 months ago

fixed

si458 commented 2 months ago

Thank u so much! The latest beta 2024.6.0b0 worked a treat! Now to disable all the petrol stations I'm not interested in and only enable at the ones I always use, haha

pantherale0 commented 2 months ago

No problem.

You could use the areas feature in the config wizard to specify the individual stations you are interested in, but might be a bit annoying to setup that way lol 😉

si458 commented 2 months ago

Yeh I've set 10 miles within my house for asda sainsburys and Tesco, and it's listing them all, and I'm just disabling the ones I'm not interested in and only my local ones I'm interested in!

Quick one too, It's showing 139.9 GBP when I set the state to E10. But this implies/graphing at £139.90. Is there any way to change this to pence? The HA display precision doesn't work/fix it

pantherale0 commented 2 months ago

Yeah, I know, it was worse during development to be honest as it literally would show the price as £139.90. The currency code is taken from the data source in the module.

As this integration targets a number of countries across the world, they all sometimes return the value a bit differently to how we show it in the UK so building something to take that into account becomes a bit messy.

si458 commented 2 months ago

Could you maybe add an option under the sources and location, like 'display' pence/pounds? Then if state is number just divide by 100 if pence?

pantherale0 commented 2 months ago

It's not impossible, but will take some time to figure out the best way to achieve without impacting anything else.

For now there are other solutions out there that might help in terms of displaying the value in the front end. But the unit (GBP) isn't actually part of the state value so automations would be fine.

si458 commented 2 months ago

That's perfectly fine! I'll leave it with you.

Thanks for the integration!

It will be very helpful when i need to fill up in the mornings before work!

It can tell me which of my supermarkets are the cheapest, haha

pantherale0 commented 2 months ago

Eventually I'd like to implement #6, but a sensor like that isn't 'easy' when the architecture of the module isn't built in a way that makes it just a simple property to reference.

pantherale0 commented 2 months ago

Could you maybe add an option under the sources and location, like 'display' pence/pounds? Then if state is number just divide by 100 if pence?

Just to add to this, as an example GasBuddy will return price information in dollars and cents like below, unlike UK where fuel is probably one of the few things that is displayed in pence.

image

I want to try and get data from PetrolPrices too as there are a large number of fuel stations in the UK that aren't included in the government trial.

si458 commented 2 months ago

@pantherale0 ok no worries! leave it with you!