MichaluxPL / Sofar_LSW3

Get MODBUS data from Sofar (K-TLX) inverter through LSW-3 or LSE module
GNU General Public License v3.0
94 stars 45 forks source link

Not able to make this work. #21

Closed sheminasalam closed 2 years ago

sheminasalam commented 2 years ago

I am getting the following error when I try to run this. Hope someone can help

Traceback (most recent call last):
  File "InverterData.py", line 51, in <module>
    os.chdir(os.path.dirname(sys.argv[0]))
FileNotFoundError: [Errno 2] No such file or directory: ''
MichaluxPL commented 2 years ago

Try to change this line to this: os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))). Alternatively if You run the script like this: python3 InverterData.py, try to run it like this: ./InverterData.py or python3 ./InverterData.py

sheminasalam commented 2 years ago

This worked

./InverterData.py or python3 ./InverterData.py