Skip to content
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

Integration cannot be installed #76

Open
CHTHSCH opened this issue Jan 8, 2023 · 23 comments
Open

Integration cannot be installed #76

CHTHSCH opened this issue Jan 8, 2023 · 23 comments

Comments

@CHTHSCH
Copy link

CHTHSCH commented Jan 8, 2023

Latest Version of Home Assistant - New Installation

When I try to add the integration, I get this error
Swiss Meteo

Integration cannot be installed. Please support

@AndromedaVIII
Copy link

I have the same Problem with a new install.

@smh51
Copy link

smh51 commented Jan 10, 2023

Same

@t077584
Copy link

t077584 commented Jan 10, 2023

Same here too. Pls see below my detailed error log (without location data). Your help would be very much appreciated!

2023-01-10 21:22:51.852 DEBUG (SyncWorker_3) [hamsclient.client] MS Client INIT
2023-01-10 21:22:51.852 DEBUG (SyncWorker_3) [hamsclient.client] INIT meteoswiss client : name = None station = None postcode = None
2023-01-10 21:22:52.015 DEBUG (SyncWorker_6) [hamsclient.client] Got data from opensteetmap: {"place_id":xxx,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":201327052,"lat":"xxx","lon":"xxx","place_rank":26,"category":"highway","type":"residential","importance":xxx,"addresstype":"road","name":"xxx","display_name":"xxx","address":{"road":"xxxx","village":"xxx","county":"xxx","state":"Aargau","xxx":"xx","postcode":"xxx","country":"xxx","country_code":"xx"},"boundingbox":["xxx","xxx","xxx","xxx"]}
2023-01-10 21:22:52.018 DEBUG (MainThread) [custom_components.meteo-swiss.config_flow] Get closest station for Lon : xxx - Lat : xxx
2023-01-10 21:22:52.018 DEBUG (SyncWorker_4) [hamsclient.client] Getting all stations from : https://data.geo.admin.ch/ch.meteoschweiz.messnetz-automatisch/ch.meteoschweiz.messnetz-automatisch_fr.csv
2023-01-10 21:22:52.492 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3621, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 163, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Altitude station m. s. mer'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 148, in post
return await super().post(request)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
result = await method(view, request, data, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 71, in post
result = await self._flow_mgr.async_init(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 225, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data, init_done)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/meteo-swiss/config_flow.py", line 62, in async_step_user
self._station =await self.hass.async_add_executor_job(self._client.get_closest_station,lat,lon)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/hamsclient/client.py", line 112, in get_closest_station
self._allStations = self.__get_all_stations()
File "/usr/local/lib/python3.10/site-packages/hamsclient/client.py", line 105, in __get_all_stations
stationData["altitude"] = line["Altitude station m. s. mer"]
File "/usr/local/lib/python3.10/site-packages/pandas/core/series.py", line 958, in getitem
return self._get_value(key)
File "/usr/local/lib/python3.10/site-packages/pandas/core/series.py", line 1069, in _get_value
loc = self.index.get_loc(label)
File "/usr/local/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3623, in get_loc
raise KeyError(key) from err
KeyError: 'Altitude station m. s. mer'

@capo42
Copy link

capo42 commented Jan 11, 2023

Hello

Same here. It seems that at Nov 15 2022 the Site and api changed. So there need to be a change in the integration.
@websylv do you think you can still upgrade it to the new api? Or do we need to say goodbye to this integration?

Regards
Capo

@t077584
Copy link

t077584 commented Jan 11, 2023

I managed to make it work with thor1872's instructions posted here #65 (comment)

@capo42
Copy link

capo42 commented Jan 11, 2023

Nice! Thanks!

@AndromedaVIII
Copy link

i get this message in terminal if i try the solution
bash: docker command not found

do i need to install something before?

@CHTHSCH
Copy link
Author

CHTHSCH commented Jan 12, 2023

I managed to make it work with thor1872's instructions posted here #65 (comment)

How did you explicitly do it?
When I try to follow the instructions I get the same error as AndromedaVIII
When I try to edit the file it says, that it does not exist

@t077584
Copy link

t077584 commented Jan 12, 2023

I managed to make it work with thor1872's instructions posted here #65 (comment)

How did you explicitly do it? When I try to follow the instructions I get the same error as AndromedaVIII When I try to edit the file it says, that it does not exist

Well, I followed the instructions given, step-by-step. One thing I did wrong at the beginning was, that I missed to disable the protection mode of the SSH & Web Terminal. The switch to do so is on the add-on info page in HA and i was looking for it in the configuration tab of the add-on.

And also, look closely to the line given on Step 6:
Type or past this command: vi /usr/local/lib/python3.10/site-packages/hamsclient/client.py
--> there is a space between vi and /usr. I missed this first and the file couldn't be found.

@AndromedaVIII
Copy link

I don't have the toggle switch for protection mode, i only have:
Start on Boot
Watchdog
Automatic updates
Sidebar

@CHTHSCH
Copy link
Author

CHTHSCH commented Jan 12, 2023

Perhaps it is related to the way HA is installed. I am using HA Core on a RaspBerry Pi, no docker

There is no python3.10 directory in the /usr/local/lib directory

@AndromedaVIII
Copy link

Thanks everyone, made it work now. i was using the wrong ssh tool not SSH and Web terminal.
#76 (comment) was also helpful

@Rudd-O
Copy link

Rudd-O commented Jan 17, 2023

HAMSclient's bug websylv/hamsclient#5 has been fixed in websylv/hamsclient@320bc06

Now HAMSclient has to get bumped in version, and the new version must be required by the integration. That would close this bug.

@perdicaro
Copy link

2023-01-19 19_39_53-Impostazioni – Home Assistant e 1 altra pagina - Personale - Microsoft​ Edge
can't install....

@steuerzentrale
Copy link

I face the same issue like @perdicaro . It should be possible to install the integration without the need of modifying files/configs via terminal/SSH

@Rudd-O
Copy link

Rudd-O commented Jan 22, 2023

@perdicaro post the logs please. Does this happen with my own fork of this project?

@perdicaro
Copy link

@perdicaro post the logs please. Does this happen with my own fork of this project?

no, with the original one

@Rudd-O
Copy link

Rudd-O commented Feb 1, 2023

The original one is dead. Forget about it. Use my fork.

@perdicaro
Copy link

The original one is dead. Forget about it. Use my fork.

how can i use your fork?

@Rudd-O
Copy link

Rudd-O commented Feb 1, 2023

First remove any successfully-setup integrations, then remove the integration itself from HACS.

Add this one as a custom repo: https://github.com/Rudd-O/homeassistant-meteoswiss .

Install the integration from the custom HACS repo you just installed.

Now you can add the integration.

@perdicaro
Copy link

2023-02-02 08_45_38-HACS – Home Assistant e altre 2 pagine - Personale - Microsoft​ Edge
your repository dont work

@Rudd-O
Copy link

Rudd-O commented Feb 2, 2023

That's very strange. Not compliant? Will investigate and fix right now. Thank you for being helpful!

@Rudd-O
Copy link

Rudd-O commented Feb 2, 2023

OK. I don't know where you see that screen, but that doesn't seem to be any of the screens I'm familiar with. It works on my side.

Here is a screenshot tutorial on how to add the repo:

https://github.com/Rudd-O/homeassistant-meteoswiss#installation

Please try these instructions and report back.

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

No branches or pull requests

8 participants