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 - AttributeError: 'module' object has no attribute 'timezone' #14

Open lbeck88 opened 3 years ago

lbeck88 commented 3 years ago

Hi all I seem to have an issue running the code:

Traceback (most recent call last): File "octoprice_main_inky.py", line 33, in the_now = datetime.datetime.now(datetime.timezone.utc) AttributeError: 'module' object has no attribute 'timezone'

I believe python installed correctly

pufferfish-tech commented 3 years ago

Off the top of my head I think this is because you're running python 2 instead of python 3. If you have python3 installed then try python3 instead of python at the command line (eg "python3 octoprice_main_inky.py")

It gets me too, every time.