Skip to content

Marshal error of WindowsPath in find_binary_dependencies() #8081

Description

@henzef

Description of the issue

I am trying to package a python project that is based on PySide6 in a windows executable, but PyInstaller fails with an exception.

The value of the "output" variable (see stacktrace below) was:

(['my_venv\\lib\\site-packages\\numpy\\.libs', WindowsPath('my_venv/Lib/site-packages/shiboken6')], ['my_venv\\Lib\\site-packages\\PySide6'])

Context information (for bug reports)

  • Output of pyinstaller --version: 6.1.0

  • Version of Python: 3.9.13 (64-bit)

  • Platform: Windows 10

  • How you installed Python: python.org/downloads

  • Did you also try this on another platform? Not tried

  • try the latest development version: done, same result

  • follow all the instructions in our "If Things Go Wrong" Guide
    (https://github.com/pyinstaller/pyinstaller/wiki/If-Things-Go-Wrong): done

Make sure everything is packaged correctly

  • start with clean installation
  • use the latest development version
  • Run your frozen program from a command window (shell) — instead of double-clicking on it
  • Package your program in --onedir mode
  • Package without UPX, say: use the option --noupx or set upx=False in your .spec-file
  • Repackage you application in verbose/debug mode. For this, pass the option --debug to pyi-makespec or pyinstaller or use EXE(..., debug=1, ...) in your .spec file.

A minimal example program which shows the error

Sorry, can't generate minimal example :-/

Stacktrace / full error message

Traceback (most recent call last):
  File "C:\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "my_venv\lib\site-packages\PyInstaller\__main__.py", line 209, in <module>
    run()
  File "my_venv\lib\site-packages\PyInstaller\__main__.py", line 189, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "my_venv\lib\site-packages\PyInstaller\__main__.py", line 61, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "my_venv\lib\site-packages\PyInstaller\building\build_main.py", line 1042, in main
    build(specfile, distpath, workpath, clean_build)
  File "my_venv\lib\site-packages\PyInstaller\building\build_main.py", line 982, in build
    exec(code, spec_namespace)
  File "my_project\build.spec", line 14, in <module>
    a = Analysis(['main.py'],
  File "my_venv\lib\site-packages\PyInstaller\building\build_main.py", line 468, in __init__
    self.__postinit__()
  File "my_venv\lib\site-packages\PyInstaller\building\datastruct.py", line 184, in __postinit__
    self.assemble()
  File "my_venv\lib\site-packages\PyInstaller\building\build_main.py", line 800, in assemble
    self.binaries.extend(find_binary_dependencies(self.binaries, collected_packages))
  File "my_venv\lib\site-packages\PyInstaller\building\build_main.py", line 217, in find_binary_dependencies
    added_dll_directories, added_path_directories = child.call(process_search_paths)
  File "my_venv\lib\site-packages\PyInstaller\isolated\_parent.py", line 319, in call
    raise RuntimeError(f"Child process call to {function.__name__}() failed with:\n" + output)
RuntimeError: Child process call to process_search_paths() failed with:
  File "my_venv\lib\site-packages\PyInstaller\isolated\_child.py", line 67, in run_next_command
    marshalled = dumps((True, output))
ValueError: unmarshallable object

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions