brnorris03 / GoogleCalendarAlarm

MIT License
0 stars 0 forks source link

Valueerror #1

Open Floreg2000 opened 7 years ago

Floreg2000 commented 7 years ago

After I run

python gcal.py

It give me this

Traceback (most recent call last): File "gcal.py", line 121, in main() File "gcal.py", line 116, in main checkCalendar(service) File "gcal.py", line 98, in checkCalendar sts = datetime.strptime(ts.split('-')[0],'%H:%M:%S') _File "/usr/lib/python2.7/_strptime.py", line 328, in strptime _datastring[found.end():]) _ValueError: unconverted data remains: +01:00__

I really dont know what to do. So can you help me with solving this problem?

roberthenzel commented 7 years ago

sts = datetime.strptime(ts.split('-')[0],'%H:%M:%S')

splits on '-'. Author of this scripts is from West You are obviously on East side of UTC zone because you are getting +01:00 Change this line to: sts = datetime.strptime(ts.split('+')[0],'%H:%M:%S') It should fix this bug.

brnorris03 commented 7 years ago

I am most certainly not on the east side of UTC, in fact, I'm in PDT (UTC -7) .

Floreg2000 commented 7 years ago

Thank you so much for the response. I will try to the fix tomorrow. I am indeed on the East side of UTC so hopefully it wil work.

brnorris03 commented 7 years ago

Thank you! It's a very handy app.