python-o365
python-o365 copied to clipboard
teams.py - OverflowError: date value out of range
The code has been working fine for a while (as you can see, at the bottom of the image, the code was run successfully and got the correct output results from Teams before), but suddenly the error occurred. I don't think I have changed anything in the system configuration.
I tried to debug and add print the local time zone and creaetedDateTime before line 261: self.created_date = parse(created).astimezone(local_tz) if created else None
I got the following results:
My questions are: (1) why it printed twice? (2) and why the last createdDateTime was: 0001-01-01T00:00:00Z? what is the root cause for this?
Appreciate any suggestions to fix this. Thank you!
I may fix this issue by change the source code in teams.py. Have to change both for "created" and "last_update":
At least it is working fine now:
But I still don't get the answers for my above questions. Could you share possible root causes for this error? why "createdDateTime" was 0001-01-01T00:00:00Z. Thank you!
I didn't write the code for Teams and don't have time right now to check the errors. I'm sorry. If you want to modify the code and make a PR it will be very welcome