JackMcKew / pyinstaller-action-windows

Github Action for building executables with Pyinstaller
MIT License
168 stars 66 forks source link

non-ASCII characters in .spec file #43

Open cinemamba opened 6 months ago

cinemamba commented 6 months ago

I'm trying to run the workflow with .spec files wich contain non-ASCII characters like: á, é, ó, ő , ű, etc., but i'm getting this error:

426 INFO: PyInstaller: 3.6
426 INFO: Python: 3.7.5
426 INFO: Platform: Windows-7-6.1.7601-SP1
436 INFO: UPX is not available.
436 INFO: Removing temporary files and cleaning cache in C:\users\root\Application Data\pyinstaller
Traceback (most recent call last):
  File "c:\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python37\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "c:\Python37\lib\site-packages\PyInstaller\__main__.py", line 114, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\Python37\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 7[34](https://github.com/cinemamba/1segSkerLM/actions/runs/7718142512/job/21038783729#step:4:35), in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "c:\Python[37](https://github.com/cinemamba/1segSkerLM/actions/runs/7718142512/job/21038783729#step:4:38)\lib\site-packages\PyInstaller\building\build_main.py", line 681, in build
    exec(code, spec_namespace)
  File "1segSkerLM_PDFblokkexport.spec", line 15, in <module>
    noarchive=False,
  File "c:\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 191, in __init__
    raise ValueError("script '%s' not found" % script)
ValueError: script 'Z:\github\workspace\src\1s�gSk�rLM_PDFblokkexport.py' not found

The .spec file looks like this:

# -*- mode: python ; coding: utf-8 -*-

import os

basedir = os.path.dirname(os.getcwd())

a = Analysis(
    [basedir + '\\src\\1ségSkérLM_PDFblokkexport.py'],
    pathex=[],
    binaries=[],
    datas=[(basedir + '\\res\\proj\\', 'share\\proj')],
    hiddenimports=['pyproj', 'fiona._shim', 'fiona.enums'],
    hookspath=[],
    runtime_hooks=[],
    excludes=[],
    noarchive=False,
)
pyz = PYZ(a.pure)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.datas,
    [],
    name='1ségSkérLM_PDFblokkexport',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=True,
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
    icon=basedir + '\\res\\icons\\alap_icon_PDF.ico'
)
JackMcKew commented 1 month ago

Can you provide a reproducible example please?