~fabrixxm/confy#28: 
Time format parse issue when opening "38C3 - merged" event info

Hi,

Was trying to open the "38C3 - merged" event info and it fails with "time data '2024-12-27T09:30:00+00:00" does not match format '%Y-%m-%d %H:%M:%S'".

Some interesting observations:

  • "38C3 - main rooms only" does not fail with the same error
  • it only does this on the second opening of this event info. On the first opening of this event info it works without error.

Trying to understand what's going on.

Status
REPORTED
Submitter
~matzipan
Assigned to
No-one
Submitted
16 days ago
Updated
5 days ago
Labels
No labels applied.

~matzipan 16 days ago

This seems to be stored as the "start" value in the meta table of the event.

~matzipan 16 days ago*

Ok, can confirm:

Frab defines this as xs:date: https://github.com/frab/schedule.xml/blob/master/schema/schedule.xml.xsd#L20C1-L20C73

But their own schema make it more complicated: https://raw.githubusercontent.com/voc/schedule/master/validator/xsd/schedule.xml.xsd

Would you be open to accepting their format if I send over a patch? I could normalize it when reading the file initially.

~fabrixxm 15 days ago

Thank you for reporting this!

The problem is here. My fix would be to expand the checks to support more formats, but I'd like to have a better and more robust solution.

I'm open to any patch which improve the really fragile xml parser :)

Main point is however to continue support any strange kind of xml which passes as Pentabarf...

~fabrixxm 15 days ago

.. I suspect that "if" is there for dates coming from events in ical format. Normalizing source values would be the right thing to do, indeed..

~fabrixxm 10 days ago

I've pushed a quick fix to this as commit 5df8ab8a86 It's still bad, so I'll leave this ticked opened as a reminder.

~matzipan 7 days ago

Oh I see. I didn't think about fixing it in that way.

What would your preferred fix then look like ?

~matzipan 7 days ago

I can confirm that it works with the 0.8.0 from flatpak.

~fabrixxm 5 days ago

I can confirm that it works with the 0.8.0 from flatpak. 👍

What would your preferred fix then look like ? I would like to have a cleaner code which parsers various schedule xml flavours (and ics) in a well-defined internal format, because that code is quite a mess.. I have to admit I'm not good in writing clean code...

~matzipan 5 days ago

I have to say my impression was that your codebase looks quite well structured, so don't be too hard on yourself.

It's also quite tricky to parse various badly defined flavors. There will always be ugly special cases.

Register here or Log in to comment, or comment via email.