NordicSemiconductor / pynrfjprog

Python wrapper around the nrfjprog dynamic link library (DLL)
Other
74 stars 26 forks source link

Infinitely repeated calls to MultiAPI when creating a MultiAPI-based application using pyinstaller #14

Closed Hellogz closed 3 years ago

Hellogz commented 5 years ago

Works fine when pyinstaller is not in use,code:

def main(): api = MultiAPI.MultiAPI('NRF52') print("get api done.") os.system("pause")

if name == 'main': main()

But an exception occurs after packaging with pyinstaller,command: pyinstaller file_name.py

Runtime screenshot

if use API.API('NRF52') is normal.

How can I solve this problem?

Hellogz commented 5 years ago

python 3.6.4, pyinstaller 3.4 windows XP 32bit and windows 10 64bit

simtind commented 3 years ago

This looks like an issue in pyinstaller. See their documentation for a workaround: https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Multiprocessing