Getting 'cannot import name 'GitHubAPI' from 'aiogithubapi'' when adding HACS via integration page
See original GitHub issueSystem Health details
System Health
version | core-2021.10.6 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
user | root |
virtualenv | false |
python_version | 3.9.7 |
os_name | Linux |
os_version | 5.10.70 |
arch | x86_64 |
timezone | Europe/London |
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 6.5 |
---|---|
update_channel | stable |
supervisor_version | supervisor-2021.10.0 |
docker_version | 20.10.7 |
disk_total | 30.8 GB |
disk_used | 7.5 GB |
healthy | true |
supported | true |
board | ova |
supervisor_api | ok |
version_api | ok |
installed_addons | Visual Studio Code (3.6.2), Terminal & SSH (9.2.1), Let’s Encrypt (4.11.0), Z-Wave JS to MQTT (0.27.0), NGINX Home Assistant SSL proxy (3.0.2) |
Lovelace
dashboards | 2 |
---|---|
resources | 0 |
views | 13 |
mode | storage |
Spotify
api_endpoint_reachable | ok |
---|
Checklist
- I’m running the newest version of HACS https://github.com/hacs/integration/releases/latest
- I have enabled debug logging for my installation.
- I have filled out the issue template to the best of my ability.
- I have read https://hacs.xyz/docs/issues
- This issue is related to the backend (integration part) of HACS.
- This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
Describe the issue
After updating to Home Assistant Core 2021.10 (Hassio-based), the HACS integration had disappeared from my integrations. I’ve followed the steps in the docs to remove the plugin and re-install with the script, however i’m getting errors in the Home Assistant logs stating:
Error occurred loading configuration flow for integration hacs: cannot import name 'GitHubAPI' from 'aiogithubapi' (/config/deps/lib/python3.9/site-packages/aiogithubapi/__init__.py)
This can be triggered by trying to add the HACS integration via the integrations page.
The integration fails to add with the following error ‘Config flow could not be loaded’.
Checking the developer tab in Chrome, I can see that the backend is returning the following payload to the request {"message": "Invalid handler specified"}
Currently i’ve also tried:
- Restarting the entire host
- Removing old HACS plugin references
- Disabled NGINX reverse proxy and connected via the default HTTP 8123 port
Any assistant would be much appreciated. Best, Ryan
Reproduction steps
1.Upgrade Home Assistant to 2021.10.x 2.Remove HACS by following guide in docs 3.Install HACS by SSHing into Hassio and running command 4.Restart HA core 5.Try to add HACS integration via integration page
Debug logs
10>, data=b'\xc1\x95N-', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:21 DEBUG (MainThread) [websockets.protocol] client - received solicited pong: c1954e2d
2021-10-22 23:53:22 DEBUG (MainThread) [homeassistant.components.google_assistant.http] Response on https://homegraph.googleapis.com/v1/devices:reportStateAndNotification with data {'requestId': 'd5a74038d16b434f980b518f783b5cca', 'agentUserId': '661cb2b3719849ffb22f462cdc079a2b', 'payload': {'devices': {'states': {'media_player.playstation_4': {'online': True, 'on': False, 'currentInput': '', 'activityState': 'INACTIVE', 'playbackState': 'STOPPED'}, 'sensor.home_outdoor_temperature': {'online': True, 'temperatureSetpointCelsius': 9.9, 'temperatureAmbientCelsius': 9.9}, 'sensor.living_room_temperature': {'online': True, 'temperatureSetpointCelsius': 22.3, 'temperatureAmbientCelsius': 22.3}, 'sensor.living_room_humidity': {'online': True, 'humidityAmbientPercent': 52}, 'sensor.bedroom_temperature': {'online': True, 'temperatureSetpointCelsius': 21.5, 'temperatureAmbientCelsius': 21.5}, 'sensor.bedroom_humidity': {'online': True, 'humidityAmbientPercent': 47}, 'sensor.bathroom_temperature': {'online': True, 'temperatureSetpointCelsius': 21.4, 'temperatureAmbientCelsius': 21.4}, 'sensor.bathroom_humidity': {'online': True, 'humidityAmbientPercent': 61}, 'sensor.room_1_temperature': {'online': True, 'temperatureSetpointCelsius': 21.7, 'temperatureAmbientCelsius': 21.7}, 'sensor.room_1_humidity': {'online': True, 'humidityAmbientPercent': 54}, 'sensor.airvisual_catford_air_quality_index': {'online': True, 'currentSensorStateData': [{'name': 'AirQuality', 'rawValue': '19'}]}, 'sensor.u_s_air_quality_index': {'online': True, 'currentSensorStateData': [{'name': 'AirQuality', 'rawValue': '8'}]}, 'media_player.living_room_tv': {'online': True, 'on': True, 'currentInput': 'PS4', 'currentVolume': 10, 'isMuted': False, 'activityState': 'STANDBY', 'playbackState': 'STOPPED'}, 'climate.living_room': {'online': True, 'thermostatMode': 'off', 'thermostatTemperatureAmbient': 22.3, 'thermostatHumidityAmbient': 52.5, 'thermostatTemperatureSetpoint': 22.3}, 'climate.bedroom': {'online': True, 'thermostatMode': 'off', 'thermostatTemperatureAmbient': 21.5, 'thermostatHumidityAmbient': 47.2, 'thermostatTemperatureSetpoint': 21.5}, 'climate.bathroom': {'online': True, 'thermostatMode': 'auto', 'thermostatTemperatureAmbient': 21.4, 'thermostatHumidityAmbient': 60.8, 'thermostatTemperatureSetpointHigh': 15.0, 'thermostatTemperatureSetpointLow': 15.0}, 'climate.room_1': {'online': True, 'thermostatMode': 'off', 'thermostatTemperatureAmbient': 21.7, 'thermostatHumidityAmbient': 53.9, 'thermostatTemperatureSetpoint': 21.7}, 'sensor.pixel_5_battery_temperature': {'online': True, 'temperatureSetpointCelsius': 29.6, 'temperatureAmbientCelsius': 29.6}, 'switch.bathroom_lights_switch': {'online': True, 'on': False}, 'switch.vents_switch': {'online': True, 'on': True}, 'sensor.bathroom_pir_temperature_2': {'online': True, 'temperatureSetpointCelsius': 22.9, 'temperatureAmbientCelsius': 22.9}, 'sensor.bathroom_pir_relative_humidity_2': {'online': True, 'humidityAmbientPercent': 59}, 'sensor.living_room_pir_temperature_2': {'online': True, 'temperatureSetpointCelsius': 23.5, 'temperatureAmbientCelsius': 23.5}, 'sensor.living_room_pir_relative_humidity_2': {'online': True, 'humidityAmbientPercent': 53}, 'sensor.outside_light_sensor_temperature': {'online': True, 'temperatureSetpointCelsius': 15.9, 'temperatureAmbientCelsius': 15.9}, 'sensor.water_sensor_6_air_temperature': {'online': True, 'temperatureSetpointCelsius': 22.7, 'temperatureAmbientCelsius': 22.7}, 'sensor.bedroom_pir_temperature_3': {'online': True, 'temperatureSetpointCelsius': 22.5, 'temperatureAmbientCelsius': 22.5}, 'sensor.bedroom_pir_relative_humidity_3': {'online': True, 'humidityAmbientPercent': 48}, 'switch.air_freshener': {'online': True, 'on': False}, 'switch.fan': {'online': True, 'on': False}}}}} was {
"requestId": "d5a74038d16b434f980b518f783b5cca"
}
2021-10-22 23:53:22 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\xe5\xca-\x85', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:22 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<6 bytes>)
2021-10-22 23:53:22 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\xe5\xca-\x85', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:22 DEBUG (MainThread) [websockets.protocol] client - received solicited pong: e5ca2d85
2021-10-22 23:53:22 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b"\x1dw'\xac", rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:22 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<6 bytes>)
2021-10-22 23:53:22 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b"\x1dw'\xac", rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:22 DEBUG (MainThread) [websockets.protocol] client - received solicited pong: 1d7727ac
2021-10-22 23:53:23 DEBUG (MainThread) [kasa.protocol] 192.168.3.238 >> {"system": {"get_sysinfo": null}}
2021-10-22 23:53:23 DEBUG (MainThread) [kasa.protocol] 192.168.3.237 >> {"system": {"get_sysinfo": null}}
2021-10-22 23:53:23 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Finished fetching sensor data in 0.018 seconds (success: True)
2021-10-22 23:53:23 DEBUG (MainThread) [kasa.protocol] 192.168.3.238 << {'system': {'get_sysinfo': {'active_mode': 'none',
'alias': 'Air Freshener',
'dev_name': 'Smart Wi-Fi Plug',
'deviceId': '8006F27E265737F31C813BC0A5F90B1D1CE74234',
'err_code': 0,
'feature': 'TIM',
'hwId': '4BCED08483FF92118AF9C35ACA47F3A2',
'hw_ver': '1.0',
'icon_hash': '',
'latitude_i': 514559,
'led_off': 0,
'longitude_i': 322,
'mac': 'B0:95:75:9C:A2:EA',
'mic_type': 'IOT.SMARTPLUGSWITCH',
'model': 'KP105(UK)',
'next_action': {'type': -1},
'ntc_state': 0,
'obd_src': 'tplink',
'oemId': 'E1238B39F1E2049D9A84CFE1754CADEE',
'on_time': 0,
'relay_state': 0,
'rssi': -36,
'status': 'new',
'sw_ver': '1.0.6 Build 200915 Rel.151233',
'updating': 0}}}
2021-10-22 23:53:23 DEBUG (MainThread) [homeassistant.components.tplink.coordinator] Finished fetching 192.168.3.238 data in 0.020 seconds (success: True)
2021-10-22 23:53:23 DEBUG (MainThread) [kasa.protocol] 192.168.3.237 << {'system': {'get_sysinfo': {'active_mode': 'none',
'alias': 'Fan',
'dev_name': 'Smart Wi-Fi Plug',
'deviceId': '80065A62527FE699E160D9D603FBDACF1CF332A8',
'err_code': 0,
'feature': 'TIM',
'hwId': '4BCED08483FF92118AF9C35ACA47F3A2',
'hw_ver': '1.0',
'icon_hash': '',
'latitude_i': 514559,
'led_off': 0,
'longitude_i': 322,
'mac': 'B0:95:75:E4:AE:1D',
'mic_type': 'IOT.SMARTPLUGSWITCH',
'model': 'KP105(UK)',
'next_action': {'type': -1},
'ntc_state': 0,
'obd_src': 'tplink',
'oemId': 'E1238B39F1E2049D9A84CFE1754CADEE',
'on_time': 0,
'relay_state': 0,
'rssi': -42,
'status': 'new',
'sw_ver': '1.0.6 Build 200915 Rel.151233',
'updating': 0}}}
2021-10-22 23:53:23 DEBUG (MainThread) [homeassistant.components.tplink.coordinator] Finished fetching 192.168.3.237 data in 0.020 seconds (success: True)
2021-10-22 23:53:23 DEBUG (MainThread) [homeassistant.components.hue.light] Finished fetching group data in 0.029 seconds (success: True)
2021-10-22 23:53:23 DEBUG (MainThread) [homeassistant.components.hue.light] Finished fetching light data in 0.046 seconds (success: True)
2021-10-22 23:53:23 DEBUG (MainThread) [pyps4_2ndscreen.ddp] SENT MSG @ DDP Proto SPORT=1987 DEST=('192.168.1.110', 987)
2021-10-22 23:53:23 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140202452297280] Received {'type': 'config_entries/flow/progress', 'id': 32}
2021-10-22 23:53:23 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140202452297280] Sending {"id": 32, "type": "result", "success": true, "result": []}
2021-10-22 23:53:23 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140202452297280] Received {'type': 'frontend/get_translations', 'language': 'en-GB', 'category': 'config', 'integration': 'hacs', 'id': 33}
2021-10-22 23:53:23 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140202452297280] Sending {"id": 33, "type": "result", "success": true, "result": {"resources": {"component.hacs.config.abort.single_instance_allowed": "Only a single configuration of HACS is allowed.", "component.hacs.config.abort.min_ha_version": "You need at least version {version} of Home Assistant to setup HACS.", "component.hacs.config.abort.github": "Could not authenticate with GitHub, try again later.", "component.hacs.config.abort.not_setup": "HACS is not setup.", "component.hacs.config.error.auth": "Personal Access Token is not correct", "component.hacs.config.error.acc": "You need to acknowledge all the statements before continuing", "component.hacs.config.step.user.data.acc_logs": "I know how to access Home Assistant logs", "component.hacs.config.step.user.data.acc_addons": "I know that there are no add-ons in HACS", "component.hacs.config.step.user.data.acc_untested": "I know that everything inside HACS is custom and untested by Home Assistant", "component.hacs.config.step.user.data.acc_disable": "I know that if I get issues with Home Assistant I should disable all my custom_components", "component.hacs.config.step.user.description": "Before you can setup HACS you need to acknowledge the following", "component.hacs.config.step.user.title": "HACS", "component.hacs.config.step.device.title": "Waiting for device activation", "component.hacs.config.progress.wait_for_device": "1. Open {url} \n2.Paste the following key to authorize HACS: \n\n{code}\n```\n"}}}
2021-10-22 23:53:23 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated 192.168.1.120 for /api/config/config_entries/flow using bearer token
2021-10-22 23:53:23 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/config/config_entries/flow to 192.168.1.120 (auth: True)
2021-10-22 23:53:24 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140202452297280] Received {'type': 'frontend/get_translations', 'language': 'en-GB', 'category': 'title', 'integration': 'hacs', 'id': 34}
2021-10-22 23:53:24 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'T\xe4\xbf\x02', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:24 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\xdf\x8f^\x99', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:24 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration hacs: cannot import name 'GitHubAPI' from 'aiogithubapi' (/config/deps/lib/python3.9/site-packages/aiogithubapi/__init__.py)
2021-10-22 23:53:24 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140202452297280] Sending {"id": 34, "type": "result", "success": true, "result": {"resources": {"component.hacs.title": "HACS"}}}
2021-10-22 23:53:24 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<6 bytes>)
2021-10-22 23:53:24 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<6 bytes>)
2021-10-22 23:53:24 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'T\xe4\xbf\x02', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:24 DEBUG (MainThread) [websockets.protocol] client - received solicited pong: 54e4bf02
2021-10-22 23:53:24 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\xdf\x8f^\x99', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:24 DEBUG (MainThread) [websockets.protocol] client - received solicited pong: df8f5e99
2021-10-22 23:53:25 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'lc\xfb;', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:25 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\x94\xbc.\x82', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:25 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<6 bytes>)
2021-10-22 23:53:25 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'lc\xfb;', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:25 DEBUG (MainThread) [websockets.protocol] client - received solicited pong: 6c63fb3b
2021-10-22 23:53:25 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<6 bytes>)
2021-10-22 23:53:25 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\x94\xbc.\x82', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:25 DEBUG (MainThread) [websockets.protocol] client - received solicited pong: 94bc2e82
2021-10-22 23:53:26 DEBUG (Recorder) [homeassistant.components.recorder] Sending keepalive
2021-10-22 23:53:26 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f837eee1300> checked out from pool
2021-10-22 23:53:26 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'L\xdeF<', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:26 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\x05G\x04\xf1', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:26 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<6 bytes>)
2021-10-22 23:53:26 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'L\xdeF<', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:26 DEBUG (MainThread) [websockets.protocol] client - received solicited pong: 4cde463c
2021-10-22 23:53:26 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<6 bytes>)
2021-10-22 23:53:26 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\x05G\x04\xf1', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:26 DEBUG (MainThread) [websockets.protocol] client - received solicited pong: 054704f1
2021-10-22 23:53:27 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\x11\xb2$:', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:27 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.PING: 9>, data=b'\xf6\xf9\x1f\xda', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:27 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<6 bytes>)
2021-10-22 23:53:27 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\x11\xb2$:', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:27 DEBUG (MainThread) [websockets.protocol] client - received solicited pong: 11b2243a
2021-10-22 23:53:27 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<6 bytes>)
2021-10-22 23:53:27 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.PONG: 10>, data=b'\xf6\xf9\x1f\xda', rsv1=False, rsv2=False, rsv3=False)
2021-10-22 23:53:27 DEBUG (MainThread) [websockets.protocol] client - received solicited pong: f6f91fda
2021-10-22 23:53:28 DEBUG (MainThread) [homeassistant.components.hue.light] Finished fetching light data in 0.018 seconds (success: True)
2021-10-22 23:53:28 DEBUG (MainThread) [homeassistant.components.hue.light] Finished fetching group data in 0.032 seconds (success: True)
2021-10-22 23:53:28 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Finished fetching sensor data in 0.046 seconds (success: True)
2021-10-22 23:53:28 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140202668408352] Received {'type': 'browser_mod/update', 'deviceID': 'fec1b27d-c83c05d3', 'data': {'browser': {'path': '/tablet-display/security', 'visibility': 'visible', 'userAgent': 'Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Raspbian Chromium/78.0.3904.108 Chrome/78.0.3904.108 Safari/537.36', 'currentUser': 'piscreen', 'fullyKiosk': False, 'width': 800, 'height': 480, 'battery_level': 100, 'charging': True, 'darkMode': False, 'userData': {'id': '3868694ab90c4a5d85e15335a36eb9f7', 'name': 'piscreen', 'is_owner': False, 'is_admin': True, 'credentials': [{'auth_provider_type': 'homeassistant', 'auth_provider_id': None}], 'mfa_modules': [{'id': 'totp', 'name': 'Authenticator app', 'enabled': False}]}, 'config': {'command': 'update'}}}, 'id': 76}
2021-10-22 23:53:28 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140202668408352] Received invalid command: browser_mod/update
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (3 by maintainers)
Top GitHub Comments
Make sure you have read the issue guidelines and that you filled out the entire template.
Thanks @alucryd , did as you mentioned and the issue resolved itself. Had removed and recreated custom_components before but did not do the deps folder.
Much appreciated!