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

Tracab with string path not working #305

Open koenvo opened 3 months ago

koenvo commented 3 months ago
          I've noticed a small bug in this PR. Kloppy allows specifying the data source as a `FileLike` object but now it only works with a `Path`. For example with a string:
from kloppy import tracab

dataset = tracab.load(
    meta_data="kloppy/tests/files/tracab_meta.xml",
    raw_data="kloppy/tests/files/tracab_raw.dat",
)

It gives the following error: AttributeError: 'str' object has no attribute 'name'

Originally posted by @probberechts in https://github.com/PySport/kloppy/issues/295#issuecomment-2037324922