pufferfish-tech / octopus-agile-pi-prices

Display the upcoming prices on the Octopus Energy "Agile" tariff.
Apache License 2.0
71 stars 27 forks source link

Error message #17

Open abbottcam opened 2 years ago

abbottcam commented 2 years ago

Hello

I've reinstalled my raspberry OS, but when reinstalling the Octopus Agile script, it throws up a message, which I didn't encounter before....

Detected Red pHAT (High-Temp) Traceback (most recent call last): File "octoprice_main_inky.py", line 28, in DB_URI = 'file:{}?mode=rw'.format(pathname2url('agileprices.sqlite')) NameError: name 'pathname2url' is not defined

any ideas? Sorry if its obvious, my coding skills are limited.

thanks

James

jerbzz commented 2 years ago

Hi. Your Python version may have changed.

Try running with 'python3' instead of 'python', or vice versa.

🙂

abbottcam commented 2 years ago

Hey, thanks for your reply!

So I tried both ways

pi@raspberrypi:~ $ /usr/bin/python3 octoprice_main_inky.py

and it still throws up an error message and my inky screen doesn't change.

DarthBlackA1 commented 1 year ago

I fixed this by adding the line "from urllib.request import pathname2url" at the top of the file