Skip to content

Issue compiling into exe with pyinstaller #1363

@SamF111

Description

@SamF111

Hi,
I am attempting to convert my script into an exe and zeroconf is causing issues.

pyinstaller v6.4.0
zeroconf v0.131.0
Python 3.12.2

import zeroconf ^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 935, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "zeroconf\__init__.py", line 26, in <module> File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 935, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "zeroconf\_core.py", line 32, in <module> File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 935, in _load_unlocked File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "zeroconf\_engine.py", line 38, in <module> File "src\\zeroconf\\_listener.py", line 1, in init zeroconf._listener File "src\\zeroconf\\_services\\info.py", line 1, in init zeroconf._services.info KeyError: '__reduce_cython__'

This appears to be an issue with how the cython in the project was compiled:
cython/cython#1953 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions