Edgar Benítez
Edgar Benítez

Reputation: 141

PyInstaller error on Windows

I'm trying to compile some Script with PyInstaller on Windows.

The script are using PySide and OpenPyXL libraries. I was installed all the dependencies with PIP (PySide, OpenPyXL, PEFILE and PyInstaller).

My script doesn't use any unicode character, but when I try to execute PyInstaller it displays the next Traceback error:

Traceback (most recent call last):
  File "C:\Python27\Scripts\pyinstaller-script.py", line 11, in <module>
    load_entry_point('PyInstaller==3.2.1', 'console_scripts', 'pyinstaller')()
  File "c:\python27\lib\site-packages\PyInstaller\__main__.py", line 90, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\python27\lib\site-packages\PyInstaller\__main__.py", line 46, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\python27\lib\site-packages\PyInstaller\building\build_main.py", line 788, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "c:\python27\lib\site-packages\PyInstaller\building\build_main.py", line 734, in build
    exec(text, spec_namespace)
  File "<string>", line 33, in <module>
  File "c:\python27\lib\site-packages\PyInstaller\building\api.py", line 650, in __init__
    self.__postinit__()
  File "c:\python27\lib\site-packages\PyInstaller\building\datastruct.py", line 161, in __postinit__
    self.assemble()
  File "c:\python27\lib\site-packages\PyInstaller\building\api.py", line 682, in assemble
    dist_nm=inm)
  File "c:\python27\lib\site-packages\PyInstaller\building\utils.py", line 190, in checkCache
    cachedfile = os.path.join(cachedir, basenm)
  File "c:\python27\lib\ntpath.py", line 86, in join
    result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 16: ordinal not in range(128)

The script path is "C:\extractorcfdi\extractorcfdi.pyw".

My Python version are 2.7.13 for x86.

Upvotes: 2

Views: 920

Answers (1)

Amoexa
Amoexa

Reputation: 11

I came across the same problem and it was apparently caused by my (Windows 7) username containing an ´ñ´ character. My workaround was to create a second username in Windows with Administrator privilege, from which I was able to generate the executable file without any error.

Upvotes: 1

Related Questions