keisentraut/awattar-statistics

Error - unknown unit

kr0815 opened this issue · 3 comments

Wanted to try out this tool

I get root@raspberrypi:/var/kr/awattar# ./awattar-statistics.py File "./awattar-statistics.py", line 48 raise ValueError(f"unknown unit {unit} in line {line}") ^ SyntaxError: invalid syntax

any ideas?

You have an empty or malformed line in your historical_data.csv. All lines must look exactly like
1387677600000;1387681200000;-30.9;Eur/MWh

I used the file from here - could you maybe upload a new one?

I just pushed it - you can try again.

But I reread your error and it looks like your python version is too old for "f-strings". It must be >3.6 for this. Maybe you accidentially ran it with Python2 on your raspberry pi... I changed the shebang in the script to explicitly use python3, maybe this will fix it.