-
Notifications
You must be signed in to change notification settings - Fork 14
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
TypeError: 'type' object is not subscriptable #2
Comments
I'm using Python 3.7.3 so maybe it's more about the version of asyncio. I'll dig deeper there and see. |
Hi! Did you make any progress? Having the same issue. On the same python version. |
Sorry to hear. I use 3.9 and was not aware that anything lower than that is not working. Please consider using 3.9 or see if 3.8 is also good? I should update that readme as soon as we find out. |
Can you try a small change and see your python version works better? Basically, simply rewrite the trouble line: mqtt2kasa/mqtt2kasa/keep_alive.py Line 76 in 1c6f8c4
as
|
Remove typing that is not supported in python 3.7: File "/home/pi/kasa/mqtt2kasa/mqtt2kasa/keep_alive.py", line 76, in kasas: dict[str, Kasa], kas: dict[str, KeepAlive], mqtt_send_q: asyncio.Queue TypeError: 'type' object is not subscriptable Fixes #2 Signed-off-by: Flavio Fernandes <[email protected]>
introduced throttle and receive queue configurations
When running as documented I see the following error...
Traceback (most recent call last):
File "mqtt2kasa/main.py", line 12, in
from mqtt2kasa.keep_alive import (
File "/home/pi/kasa/mqtt2kasa/mqtt2kasa/keep_alive.py", line 76, in
kasas: dict[str, Kasa], kas: dict[str, KeepAlive], mqtt_send_q: asyncio.Queue
TypeError: 'type' object is not subscriptable
My configuration looks like this...
knobs:
# Note: normally you don't set these... here just to show how to
# devel and debug
# log_to_console: false
# log_level_debug: false
mqtt:
# ip/dns for the mqtt broker
host: 192.168.35.90
globals:
# every location will be managed using a unique mqtt topic
# unless explicitly specified, this format will be used
topic_format: /{}/switch
# kasa will monitor the current state of the device every
# poll interval, in seconds. You can override on a per device
poll_interval: 11
locations:
# coffee maker. To turn it on, use mqtt publish
# topic: /coffee_maker/switch payload: on
# subscribe to /coffee_maker/switch to know its state
living_room_lights
host: 192.168.35.103
desk_lights:
host: 192.168.35.120
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: