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.

0.20.x: cannot reuse already awaited coroutine

See original GitHub issue

Version of HACS

0.20.x

Describe the bug

HACS doesn’t allow to install or update anything. Buttons Install/Update are grayed. All the time progress bar shows update data from GitHub and every 30 minutes I have error in log. This state persists for several days.

Debug log

2020-01-15 11:57:13 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/hacs/hacsbase/__init__.py", line 304, in recuring_tasks_installed
    await self.factory.execute()
  File "/home/homeassistant/.homeassistant/custom_components/hacs/hacsbase/task_factory.py", line 24, in execute
    await asyncio.gather(*self.tasks)
RuntimeError: cannot reuse already awaited coroutine

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
andriejcommented, Jan 20, 2020

Same error, 0.104.2, latest HACS. Restart helps but problem reappeares.

1reaction
bieniucommented, Jan 16, 2020

After HA restart everything is normal.

Read more comments on GitHub >

github_iconTop Results From Across the Web

asyncio - await coroutine more than once (periodic tasks)
It seems you are confusing async functions (coroutine functions) with coroutines - values that these async functions produce.
Read more >
9.4. AsyncIO Coroutine - Python
Coroutine functions are not awaitables. Coroutine objects are awaitables. Coroutines declared with the async / await syntax is the preferred way of writing ......
Read more >
Async IO in Python: A Complete Walkthrough
They have their own small set of rules (for instance, await cannot be used in a generator-based coroutine) that are largely irrelevant if...
Read more >
What Are You Waiting For? Use Coroutines for Asynchronous ...
For the synchronous I/O version, the thread iterates over the morsel's swips. If the referenced page is not cached, the thread issues a...
Read more >
awaiting on coroutine more than once should be an error
OK, but only for await (not for yield from). ... "Cannot reuse already awaited coroutine" Great, I like it! Thanks Martin and Nick....
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