You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TapoP100 works fine on my windows PC using spyder.
Installing the package on my raspberry TapoP100 was only successful using "pip3" / "python3".
Trying to use TapoP100 then leads to the following error message:
Traceback (most recent call last):
File "TPLink_P115_Auslesen.py", line 8, in <module>
from PyP100 import PyP110
File "/home/pi/.local/lib/python3.5/site-packages/PyP100/PyP110.py", line 12
URL = f"http:\\{self.ipAddress}\app?token={self.token}"
^
SyntaxError: invalid syntax
I also tried to see what happens if I could fix this error (without realy fixing it). I then run into the next error:
Traceback (most recent call last):
File "TPLink_P115_Auslesen.py", line 8, in <module>
from PyP100 import PyP110
File "/home/pi/.local/lib/python3.5/site-packages/PyP100/PyP110.py", line 1, in <module>
from PyP100 import PyP100
File "/home/pi/.local/lib/python3.5/site-packages/PyP100/PyP100.py", line 79
decode: bytes = b64decode(key.encode("UTF-8"))
^
SyntaxError: invalid syntax
Any hind how to resolve this?
The text was updated successfully, but these errors were encountered:
The problem lays in the python version. In the library you can see that the author is using f-string which are introduced in python 3.6 and on stack trace you see rpi uses python 3.5. So you have a couple of alternatives - either fork the repo and change from f"http:\\{self.ipAddress}\app?token={self.token}" string into "http:\\{}\app?token={}".format(self.ipAddress, self.token) and in other places as well if you can only use 3.5 or upgrade python version or just copy the request calls to your own python and work from there.
TapoP100 works fine on my windows PC using spyder.
Installing the package on my raspberry TapoP100 was only successful using "pip3" / "python3".
Trying to use TapoP100 then leads to the following error message:
I also tried to see what happens if I could fix this error (without realy fixing it). I then run into the next error:
Any hind how to resolve this?
The text was updated successfully, but these errors were encountered: