Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error - unknown unit #1

Open
kr0815 opened this issue Jan 27, 2023 · 3 comments
Open

Error - unknown unit #1

kr0815 opened this issue Jan 27, 2023 · 3 comments

Comments

@kr0815
Copy link

kr0815 commented Jan 27, 2023

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?

@keisentraut
Copy link
Owner

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

@kr0815
Copy link
Author

kr0815 commented Mar 18, 2023

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

@keisentraut
Copy link
Owner

keisentraut commented Mar 18, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants