fishbigger / TapoP100

A module for controlling the TP-Link Tapo P100 Plugs
MIT License
566 stars 138 forks source link

Hanksharke issue : KeyError: 'result' #140

Closed Number-313 closed 1 month ago

Number-313 commented 1 month ago

Hello, I'm having an issue using PyP100

from PyP100 import PyP100 p100 = PyP100.P100("192.168.X.X, "myemail@email.com", "MyPaSsWoRd!") p100.handshake() p100.login() p100.turnOffWithDelay(45)

here's what I get when I execute the script :

root@raspberrypi:/usr/local/bin# shutdown_with_tapo.sh Traceback (most recent call last): File "/usr/local/bin/scripts/tapo_off.py", line 6, in p100.handshake() File "/usr/local/lib/python3.9/dist-packages/PyP100/PyP100.py", line 129, in handshake encryptedKey = r.json()["result"]["key"] KeyError: 'result'

Number-313 commented 1 month ago

Alright, with a simple reinstall I could fix my issue :

pip uninstall pyp100 && pip install git+https://github.com/almottier/TapoP100.git@main