0

I get this error:

start_date = datetime(2022, 05, 24)
                             ^
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers

My code is this:

start_date = datetime(2022, 05, 24)
end_date = datetime(2022, 06, 01)

msg = ow.get_historic_weather(4885, start_date, end_date, "day")
print(msg)

I think that I am using the datetime library as it should? Why is there this error?

janw
  • 7,168
  • 9
  • 31
  • 54
  • This has nothing to do with datetime. You'll get the same error if you simply do `x = 05`. Use `5` instead of `05`. – Barmar May 24 '22 at 19:33

0 Answers0