Skip to content

Conversation

kuraha4
Copy link

@kuraha4 kuraha4 commented Feb 6, 2021

My environment:
Windows 10 (Japanese system locale), Inkscape 1.01

Problem:
When I run the extension in Inkscape, generator.py throws an error like this:

Traceback (most recent call last):
  File "generator.py", line 382, in <module>
    globaldata.template = f.read()
UnicodeDecodeError: 'cp932' codec can't decode byte 0x89 in position 616: illegal multibyte sequence

Solution:
Added encoding='utf-8' argument to open() and the extension worked fine for me.

FYI, this section of the doc has an example in regards to the system default encoding.
https://docs.python.org/3/library/csv.html#examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant