bieniu/brother

object tuple can't be used in 'await' expression

bmaehr opened this issue · 6 comments

2023-02-25 23:18:15.010 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Drucker9120 for brother
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.11/site-packages/homeassistant/config_entries.py", line 382, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant/lib/python3.11/site-packages/homeassistant/components/brother/init.py", line 33, in async_setup_entry
brother = await Brother.create(
^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant/lib/python3.11/site-packages/brother/init.py", line 95, in create
await instance.initialize()
File "/srv/homeassistant/lib/python3.11/site-packages/brother/init.py", line 121, in initialize
_, errstatus, errindex, _ = await get_result
^^^^^^^^^^^^^^^^
TypeError: object tuple can't be used in 'await' expression

Please add more information or this issue will be closed. Thanks.

Issue is in this line

_, errstatus, errindex, _ = await get_result
I don't know why it is not allowed - I"m not a python developer.

Which version of the package?

Same error here.
Version 2.2.0, Python 3.11.1

I made a PR: #191

With this fix the script works for me.

Fixed via #191