-
Notifications
You must be signed in to change notification settings - Fork 55
Issue with 'await' after upgrade from 1.6.1 to 1.6.3 #712
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
Comments
@craigbarratt I think the change in ast_await should help, but I can’t verify it yet: if coro and (asyncio.iscoroutine(coro) or asyncio.isfuture(coro)): |
@stopcoder can you confirm whether @dmamelin's proposed fix solves your problem? |
My script works again after patching the line with the given code in |
Released 1.6.4 with this fix. |
I have the following code to get the history data from
recorder
statistics in Home Assistant. The code stopped working after upgrading to 1.6.3 from 1.6.1. I also tested with 1.6.2 and the issue also occurs.The error is:
Exception in <jupyter_0> line 47:
return [datetime.fromtimestamp(entry["start"]).day for entry in sensor_history[sensor_name] if entry["max"] >= 90]
TypeError: '_asyncio.Future' object is not subscriptable
It seems like the
Future
returned fromasync_add_executor_job
can't be awaited to a result. Thesensor_history
returned from theawait
is still aFuture
instance.The text was updated successfully, but these errors were encountered: