question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error during configuration - generator didn't stop after athrow

See original GitHub issue

Version of the custom_component

I can’t tell as I wasn’t able to set it up through integrations. I got as far as adding it via HACS but when I got to Configuration > Add > Govee and then input the api key, I got an “Unknown error”.

Configuration

None. Set up via Integrations per instructions.
Add your logs here.

Describe the bug

A clear and concise description of what the bug is. I get an “Unknown Error” when I attempt to add my API key in the configuration. I’m using Docker on ubuntu 18.04 with HA .118.5.

Debug log


Add your logs here.
Logger: custom_components.govee.config_flow
Source: custom_components/govee/config_flow.py:25
Integration: Govee LED strips (documentation, issues)
First occurred: 8:59:21 PM (1 occurrences)
Last logged: 8:59:21 PM

Unexpected exception: generator didn't stop after athrow()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/govee_api_laggat/govee_api_laggat.py", line 168, in _api_request_internal
    yield response
  File "/usr/local/lib/python3.8/site-packages/govee_api_laggat/govee_api_laggat.py", line 151, in _api_get
    yield response
  File "/usr/local/lib/python3.8/site-packages/govee_api_laggat/govee_api_laggat.py", line 355, in get_devices
    for item in result["data"]["devices"]:
KeyError: 'devices'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/govee/config_flow.py", line 45, in async_step_user
    info = await validate_input(self.hass, user_input)
  File "/config/custom_components/govee/config_flow.py", line 25, in validate_input
    _, error = await hub.get_devices()
  File "/usr/local/lib/python3.8/site-packages/govee_api_laggat/govee_api_laggat.py", line 409, in get_devices
    err = f"API-Error {response.status}: {result}"
  File "/usr/local/lib/python3.8/contextlib.py", line 189, in __aexit__
    await self.gen.athrow(typ, value, traceback)
  File "/usr/local/lib/python3.8/site-packages/govee_api_laggat/govee_api_laggat.py", line 151, in _api_get
    yield response
  File "/usr/local/lib/python3.8/contextlib.py", line 190, in __aexit__
    raise RuntimeError("generator didn't stop after athrow()")
RuntimeError: generator didn't stop after athrow()

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
darenmalfaitcommented, Jan 28, 2021

I’m getting the exact same error. Running in a docker home-assistant docker container on a rapsberry pi 4.

0reactions
LaggAtcommented, Apr 25, 2021

think the library hides the correct error, which is addressed here: https://github.com/LaggAt/python-govee-api/tree/bug/%237_eror_during_configuration

I expect that to be an useful information now, maybe some api stuff, so I’ll close here. Please await the release of the integration before reopening 😃 Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

why does Contextmanager throws a runtime error 'generator ...
The with statement is not a looping construct. It cannot be used to execute code repeatedly. A context manager created with @contextmanager ...
Read more >
When run test with off postgres database got `RuntimeError
I have only default database configuration and if I run tests without started postgresql I got
Read more >
[Django] #32403: When run test with off postgres database got ...
[Django] #32403: When run test with off postgres database got `RuntimeError: generator didn't yield` instead of connection error.
Read more >
Known Response Types throw Exception with wrapped ...
The current implementation of Client generator will throw exceptions when the response code is not 2XX, even when the wrapResponses option is set...
Read more >
why does Contextmanager throws a runtime error 'generator ...
In my utility.py I have, @contextmanager def rate_limit_protection(max_tries=3, wait=300): tries = 0 while max_tries > tries: try: yield break except ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found