Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xba in position 114: invalid start byte #279

Open
xtokens opened this issue Jun 6, 2022 · 1 comment

Comments

@xtokens
Copy link

xtokens commented Jun 6, 2022

  • Your operating system(s) : Windows10
  • Your Python version: 3.7.0
  • Your fbs version 1.1.3 pro
  • Your PyInstaller version 5.1
  • Your PyQt / PySide version 5.15.6

When the app_name configured in the settings/base.json file is Chinese, executing fbs freeze will report the following error. When I change the app_name to English, it works fine. But my business needs app_name in Chinese, how can I fix this problem?

331 WARNING: Failed to collect submodules for 'pkg_resources._vendor.pyparsing.diagram' because importing 'pkg_resources._vendor.pyparsing.diagram' raised: ModuleNotFoundError: No module
named 'railroad'
qt.network.ssl: QSslSocket: cannot resolve EVP_PKEY_param_check
qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_ciphersuites
qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_use_session_callback
qt.network.ssl: QSslSocket: cannot resolve SSL_SESSION_is_resumable
qt.network.ssl: QSslSocket: OpenSSL >= 1.1.1 is required; OpenSSL 1.1.0h  27 Mar 2018 was found instead
517 WARNING: Failed to collect submodules for 'setuptools._vendor.pyparsing.diagram' because importing 'setuptools._vendor.pyparsing.diagram' raised: ModuleNotFoundError: No module named
'railroad'
Traceback (most recent call last):
  File "C:\Users\Carol\AppData\Local\Programs\Python\Python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\Carol\AppData\Local\Programs\Python\Python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "c:\users\carol\documents\hw\vdown\venv\scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "c:\users\carol\documents\hw\vdown\venv\lib\site-packages\PyInstaller\__main__.py", line 178, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\users\carol\documents\hw\vdown\venv\lib\site-packages\PyInstaller\__main__.py", line 59, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\users\carol\documents\hw\vdown\venv\lib\site-packages\PyInstaller\building\build_main.py", line 842, in main
    build(specfile, distpath, workpath, clean_build)
  File "c:\users\carol\documents\hw\vdown\venv\lib\site-packages\PyInstaller\building\build_main.py", line 764, in build
    exec(code, spec_namespace)
  File "C:\Users\Carol\Documents\hw\vdown\target\PyInstaller\测试应用.spec", line 20, in <module>
    noarchive=False,
  File "c:\users\carol\documents\hw\vdown\venv\lib\site-packages\PyInstaller\building\build_main.py", line 319, in __init__
    self.__postinit__()
  File "c:\users\carol\documents\hw\vdown\venv\lib\site-packages\PyInstaller\building\datastruct.py", line 173, in __postinit__
    self.assemble()
  File "c:\users\carol\documents\hw\vdown\venv\lib\site-packages\PyInstaller\building\build_main.py", line 516, in assemble
    priority_scripts = self.graph.analyze_runtime_hooks(self.custom_runtime_hooks) + priority_scripts
  File "c:\users\carol\documents\hw\vdown\venv\lib\site-packages\PyInstaller\depend\analysis.py", line 602, in analyze_runtime_hooks
    rthooks_nodes.append(self.add_script(hook_file))
  File "c:\users\carol\documents\hw\vdown\venv\lib\site-packages\PyInstaller\depend\analysis.py", line 280, in add_script
    return super().add_script(pathname, caller=caller)
  File "c:\users\carol\documents\hw\vdown\venv\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1419, in add_script
    contents = fp.read() + '\n'
  File "C:\Users\Carol\AppData\Local\Programs\Python\Python37-32\lib\codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xba in position 114: invalid start byte


Thanks,

Michael

@mherrmann
Copy link
Owner

This seems like a regression in PyInstaller 4.7 (source). Are you able to downgrade to an older PyInstaller version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants