UTF-8 decode error if the path to the script contains letters not in the standard English alphabet
Description of the issue
I was a bit unsure of whether to submit the issue here or in the pyinstaller repo. I'll start here.
If your script and/or icon is located in a folder where the path has letters such as æ, ø or å (in other words non-English letters) it will fail and display an error (utf-8 decode error: invalid continuation byte - see section below). Initially, I thought it was due to the & being included in one of the folder names, but tests show that is not the issue. What is really weird is that the position reported in the log is not even one that corresponds to æ, ø or å in the path given further down. It is - as far as I can tell - an s (unless I'm reading the log incorrectly).
Context information
PSGCompiler version: 1.5.0 PyInstaller version: 5.7.0 Python version: 3.10.8 Platform: Windows-10-10.0.19044-SP0 Other platforms: I have not tried this on other platforms nor do I have the option to.
Example program
import PySimpleGUI as gui
layout = [[gui.Text('Kør mangelmotor')], [gui.Button('OK')]]
main_window = gui.Window(title='Mangelmotoren', icon='GUI\Resources\mm_ikon.ico', layout=layout, margins=(100, 50))
while True:
event, values = main_window.read()
if event == 'OK' or event == gui.WIN_CLOSED:
break
main_window.close()
Steps to re-produce error
Create a folder with the letters mentioned in the first section of this issue (or other non-English letters). The path I used was:
G:/ADM/Administration & Service/Administration/Økonomi/Ledelsesinformation/Mangelkontrol/Mangelmotor/Udvikling/GUI/main_window.py
Stacktrace / full error message
[EXE Maker] Starting process...
264 INFO: PyInstaller: 5.7.0
264 INFO: Python: 3.10.8
295 INFO: Platform: Windows-10-10.0.19044-SP0
[EXE Maker] *********************** FAILED ***********************
'utf-8' codec can't decode byte 0xd8 in position 63: invalid continuation byte