You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
com.google.gson.JsonParseException: java.time.format.DateTimeParseException: Text '2024-08-20' could not be parsed at index 10
at edu.ksu.canvas.impl.GsonResponseParser$6.deserialize(GsonResponseParser.java:79) ~[canvas-api-2.0.0.jar:na]
at edu.ksu.canvas.impl.GsonResponseParser$6.deserialize(GsonResponseParser.java:67) ~[canvas-api-2.0.0.jar:na]
at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) ~[gson-2.9.0.jar:na]
at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:63) ~[gson-2.9.0.jar:na]
...
The cause is the all_day_date field, which is in the format "yyyy-MM-dd" (with no time or timezone data), and consequently cannot be parsed as a Date by gson.
Two possible fixes:
Edit the getDefaultGsonParser in edu.ksu.canvas.impl.GsonResponseParser to have another fallback to handle these date formats.
Turn the AssignmentOverride.allDayDate field into a String instead of a Date.
I would lean towards option 2, since it would be unwise to treat this as a date anyway given that it has no timezone info.
Happy to write a pull request, but will anyone action it? This is a great repository but it seems like it has been dead for a few years now?
The text was updated successfully, but these errors were encountered:
A
DateTimeParseException
error is thrown whenever you attempt to retrieve assignment overrides for an assignment that actually has some overrides.throws:
The cause is the
all_day_date
field, which is in the format "yyyy-MM-dd" (with no time or timezone data), and consequently cannot be parsed as aDate
by gson.Two possible fixes:
getDefaultGsonParser
inedu.ksu.canvas.impl.GsonResponseParser
to have another fallback to handle these date formats.AssignmentOverride.allDayDate
field into aString
instead of aDate
.I would lean towards option 2, since it would be unwise to treat this as a date anyway given that it has no timezone info.
Happy to write a pull request, but will anyone action it? This is a great repository but it seems like it has been dead for a few years now?
The text was updated successfully, but these errors were encountered: