home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.61k stars 29.93k forks source link

Failed import in sensor.py for thermoworks #120137

Open bodenmemberships opened 3 months ago

bodenmemberships commented 3 months ago

The problem

Thermoworks doesn't show up. Logs show that there is an include which fails:

Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:366 integration: Sensor (documentation, issues) First occurred: 10:03:00 PM (1 occurrences) Last logged: 10:03:00 PM

Error while setting up thermoworks_smoke platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform await asyncio.shield(awaitable) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/thermoworks_smoke/sensor.py", line 88, in setup_platform mgr = thermoworks_smoke.initialize_app(email, password, True, excluded) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/thermoworks_smoke/thermoworks_smoke.py", line 23, in initialize_app return ThermoworksDataMgr(email, password, init, exclude_serials) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/thermoworks_smoke/thermoworks_smoke.py", line 31, in init import pyrebase File "/usr/local/lib/python3.12/site-packages/pyrebase/init.py", line 1, in from .pyrebase import initialize_app File "/usr/local/lib/python3.12/site-packages/pyrebase/pyrebase.py", line 20, in from requests_toolbelt.adapters import appengine File "/usr/local/lib/python3.12/site-packages/requests_toolbelt/adapters/appengine.py", line 42, in from .._compat import gaecontrib ImportError: cannot import name 'gaecontrib' from 'requests_toolbelt._compat' (/usr/local/lib/python3.12/site-packages/requests_toolbelt/_compat.py)

What version of Home Assistant Core has the issue?

core-2024.6.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

thermoworks

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

# ThermoWorks Smoke entry
sensor:
  - platform: thermoworks_smoke
    email: {excluded}
    password: !secret thermoworks_pass
    monitored_conditions:
      - probe1
      - probe1_min
      - probe1_max
      - probe2
      - probe2_min
      - probe2_max

Anything in the logs that might be useful for us?

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:366
integration: Sensor (documentation, issues)
First occurred: 10:03:00 PM (1 occurrences)
Last logged: 10:03:00 PM

Error while setting up thermoworks_smoke platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/thermoworks_smoke/sensor.py", line 88, in setup_platform
    mgr = thermoworks_smoke.initialize_app(email, password, True, excluded)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thermoworks_smoke/thermoworks_smoke.py", line 23, in initialize_app
    return ThermoworksDataMgr(email, password, init, exclude_serials)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/thermoworks_smoke/thermoworks_smoke.py", line 31, in __init__
    import pyrebase
  File "/usr/local/lib/python3.12/site-packages/pyrebase/__init__.py", line 1, in <module>
    from .pyrebase import initialize_app
  File "/usr/local/lib/python3.12/site-packages/pyrebase/pyrebase.py", line 20, in <module>
    from requests_toolbelt.adapters import appengine
  File "/usr/local/lib/python3.12/site-packages/requests_toolbelt/adapters/appengine.py", line 42, in <module>
    from .._compat import gaecontrib
ImportError: cannot import name 'gaecontrib' from 'requests_toolbelt._compat' (/usr/local/lib/python3.12/site-packages/requests_toolbelt/_compat.py)

Additional information

No response

home-assistant[bot] commented 3 months ago

thermoworks_smoke documentation thermoworks_smoke source

lcoppenr commented 2 months ago

Same problem here.