fishbigger / TapoP100

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

ImportError #106

Open BogdanARZ opened 1 year ago

BogdanARZ commented 1 year ago

Hello guys , i've been trying to solve this error for hours , but i keep gettin' it , can someone come up with a solution?

The error : Traceback (most recent call last): File "C:\Users\Bogdan\Desktop\TapoP100-main\PyP100\PyP100.py", line 10, in from . import tp_link_cipher ImportError: attempted relative import with no known parent package

Belvenix commented 1 year ago

It's most likely you are running the file from the incorrect directory which is PyP100\PyP100.py. It's saying that it does not know any parent package which is correct because the PyP100.py file is the one you are most likely running as "main.py". To fix this you should write either main.py in folder above or try to use this like a library which is simply (in your outside script) call from PyP100 import PyP100 which is what you probably want to do.