comic / evalutils

evalutils helps users create extensions for grand-challenge.org
https://grand-challenge.org
MIT License
23 stars 9 forks source link

pandas read_csv error on pytests python 3.7+ #306

Closed silvandeleemput closed 3 years ago

silvandeleemput commented 3 years ago

Description

When working on #299 I discovered that some (unrelated) pytests would fail due to a difference in pandas:

What I Did

3.6, pandas==1.1.5, tests pass
3.7, pandas==1.2.2, tests fail
3.8, pandas==1.2.2, tests fail

CSVLoader
 read_csv(fname, skipinitialspace=True).to_dict(
                orient="records"
            )

pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 7, saw 2

This can be fixed by explicitly setting the encoding to utf-8.