PySport / kloppy

kloppy: standardizing soccer tracking- and event data
https://kloppy.pysport.org
BSD 3-Clause "New" or "Revised" License
326 stars 55 forks source link

Periods creation for StatsBomb deserializer fails in rare occasions #312

Open DriesDeprest opened 1 month ago

DriesDeprest commented 1 month ago

In rare occasions, I've seen that StatsBomb matches have more than one period start / end event for a given team in their events data, which results in the StatsBomb deserializer returning a DeserializationError: "Failed to determine start and end time of periods.".

When this is the case the first_start_and_end_half_events contains 5 elements (see screenshot below), which results into the DeserializationError.

image