I have a very simple Python program:
----------------------------------------------------------------------------------------------
import sys
import os
print "Getfilesystemencoding: ", sys.getfilesystemencoding()
print "LANG: ", os.getenv('LANG')
----------------------------------------------------------------------------------------------
On my Ubuntu 12.04 64-bit system using Pyinstaller 2.1 with the following
spec file:
# -*- mode: python -*-
a = Analysis(['test.py'],
pathex=['/home/ges/Junk/pytest'],
hiddenimports=[],
hookspath=None,
runtime_hooks=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='test',
debug=False,
strip=None,
upx=True,
console=True )
I generate a one-file executable (actually, the same behavior applies for
one-directory).
Running the frozen code I get the following output:
Getfilesystemencoding: None
LANG: en_US.UTF-8
The regular (unfrozen) script produces the following:
Getfilesystemencoding: UTF-8
LANG: en_US.UTF-8
I have confirmed that the frozen archive includes the necessary "encodings"
and "codecs" modules and see the pyinstaller "hook" functions called for
those Python modules. This is (obviously) a very simple program that
*should* just work. Unfortunately, in all frozen scenarios the file system
encoding is *always* none. This is probably identical to bug report #885
reported on the PyInstaller Trac system. Unfortunately, it does not appear
to have been resolved. Can anyone offer a suggestion for a fix? I've tried
several approaches already including explicitly importing "encodings" and
"codecs" and setting the locale as suggested in ticket #885. I've also
printed out the environments for the regular and frozen situations and they
are identical.
Thanks . . .
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.