Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
'Failed to execute script pyiboot01_bootstrap' for windows account name 'teşt' #2754
When I run my pyinstaller-packaged product on a windows machine with a local account name 'teşt' (that's 'test' but instead of a regular 's' it's a U+015F [http://www.fileformat.info/info/unicode/char/015f/index.htm]), the binaries fail to extract, with error message 'Failed to execute script pyiboot01_bootstrap'.
It looks like what is happening is this: The temp path is retrieved at
GetTempNameW returns C:\Users\teşt\AppData\Local\Temp (i.e., it includes the unicode character)
Running in debug mode, I can see that it prints out the utf-8 version of the string with the multibyte character displayed as a two characters (unicode code point 015F => utf-8: C5 9F), so most debug message boxes show C:\Users\teÅŸt\AppData\Local\Temp_MEIxxxxx
the path gets converted to ANSI. The conversion to ANSI strips the cedilla off the 'ş' making it a plain 's', and the resulting path points to a temp directory that does not exist. This, I think, is what leads to the error.
I would have thought that the conversion to SFN should have made it c:\Users\TET~1\AppData\Local\Temp (which is the short name that works at the command prompt). But that doesn't seem to be the case.
Have you seen this before? If not, are you able to repro it? A user reported it to me, and I was able to repro on my windows machine.
It can be worked around by having the user create a new temp directory without the 'ş' and update their TMP environment variable. But the "Failed to execute script pyiboot01_bootstrap" is such a nebulous message that the user would never guess that workaround on their own and would have to contact me and then be able to follow instructions to change an env variable.
referenced this issue
Aug 24, 2017
@htgoebel really busy recently, hard to make some free time,
and yup, using Python 3 do resolve many unicode related issue,
as Py 3.5 and above have Universal CRT lib issue,
@xoviat oops, probably can raise the bar to 3.5, Universal CRT is use in 3.6?
py2 do support unicode path, if you pass unicode string into os.path, it return unicode as you expect,
in short, py2 do support unicode path, but require extreme attention around everywhere, which doesn't worth it.