inkstitch / pyembroidery

libembroidery/EmbroideryFormats converted to python
MIT License
71 stars 28 forks source link

read_dst decoding error #92

Open hdacosta400 opened 2 years ago

hdacosta400 commented 2 years ago

Hi, I am getting this error when trying to read a .dst file that I created using the pyembroidery API. What's weird about this is that it is readable on my partner's Window machine but not on my Mac. What ways are there to go about fixing this?

File "stitch_plotter.py", line 25, in <module> pattern = pyembroidery.read_dst('pattern.dst', settings="ISO-8859-1") File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyembroidery/PyEmbroidery.py", line 484, in read_dst return read_embroidery(DstReader, f, settings, pattern) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyembroidery/PyEmbroidery.py", line 473, in read_embroidery reader.read(stream, pattern, settings) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyembroidery/DstReader.py", line 86, in read dst_read_header(f, out) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyembroidery/DstReader.py", line 55, in dst_read_header header_string = header.decode('utf8') UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 8: invalid continuation byte