PyVRP/VRPLIB

UnicodeDecodeError when reading SINTEF solution file

Closed this issue · 2 comments

I'm encountering an UnicideDecodeError when reading this SINTEF solution file:

https://www.sintef.no/contentassets/1072c7f55b3a422c850bec316458767d/c2_4_7.txt

solution = vrplib.read_solution('c2_4_7.txt') # raises UnicodeDecodeError

Some googling showed me that
https://github.com/leonlan/VRPLIB/blob/c504de49176125fe523b6f2d931eac62eb0d2683/vrplib/read/read_solution.py#L21

should be changed to

    with open(path, "rb") as fi:

I'm not sure if this is considered a "bug" of the vrplib package, or if this is simply a data issue. I don't think it's reasonable to support all types of encodings.

I think it's reasonable to only support UTF-8, which is the current default. So I'm going to close this issue.