fishbigger / TapoP100

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

Can't login anymore #45

Closed jensjpedersen closed 2 years ago

jensjpedersen commented 2 years ago

I get the following error when I'm calling the login method with my Tapo P100 device.

Traceback (most recent call last):
  File "/home/jensjp/Repos/TapoP100/PyP100/PyP100.py", line 177, in login
    self.token = ast.literal_eval(decryptedResponse)["result"]["token"]
KeyError: 'result'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jensjp/Repos/TapoP100/test.py", line 9, in <module>
    p100.login()
  File "/home/jensjp/Repos/TapoP100/PyP100/PyP100.py", line 182, in login
    raise Exception(f"Error Code: {errorCode}, {errorMessage}")
Exception: Error Code: -1501, Invalid Request or Credentials

The decryptedResponse variable returns the error code; {"error_code":-1501}}. All the methods worked fine until mid desember. The first occurrence of the problem may have started with a password change to my tp-link account (not sure).

v4d1mm1 commented 2 years ago

I had the same problem when my password was longer and more complex. After I've changed it everything started to work fine.

jensjpedersen commented 2 years ago

Thanks! That worked.