vapoursynth-preview icon indicating copy to clipboard operation
vapoursynth-preview copied to clipboard

unicode encode error

Open LightArrowsEXE opened this issue 3 years ago • 0 comments

I'm running into the following error with vspreview on Windows:

Traceback (most recent call last):
  File "D:\Users/light/Documents/_Github/vapoursynth-preview\vspreview\toolbars\misc.py", line 40, in <lambda>
    self.reload_script_button.     clicked.connect(lambda: self.main.reload_script())  # pylint: disable=unnecessary-lambda
  File "D:\Users/light/Documents/_Github/vapoursynth-preview\vspreview\main.py", line 603, in reload_script
    self.toolbars.misc.save_sync()
  File "D:\Users/light/Documents/_Github/vapoursynth-preview\vspreview\toolbars\misc.py", line 137, in save_sync
    f.write(f'# VSPreview storage for {self.main.script_path}\n')
  File "C:\Users\light\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\uff0f' in position 124: character maps to <undefined>

The cause appears to be me including unicode characters in the filepath (path has a ). Removing it fixes the issue, but it would be great if it allowed for utf-8 unicode characters to be part of the filepath without issue.

LightArrowsEXE avatar Jun 28 '21 22:06 LightArrowsEXE