intrepidcs / python_ics

Library for interfacing with Intrepid devices in Python
MIT License
61 stars 29 forks source link

How to build a app(*.exe)? #120

Closed YongwangWu closed 2 years ago

YongwangWu commented 2 years ago

I tried to build a application,for example,to build a module in examples folder with pyinstaller,it output a transmit_can_example.exe,however,it raise error. The detail is as following:

PS E:\Programs\Pythons\Trial\python_ics-master\examples\dist> .\transmit_can_example.exe Traceback (most recent call last): File "transmit_can_example.py", line 1, in File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module File "ics__init__.py", line 2, in

YongwangWu commented 2 years ago

Traceback (most recent call last): File "transmit_can_example.py", line 1, in File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module File "ics__init__.py", line 2, in AttributeError: module 'ics.structures' has no attribute 's_extended_data_flash_header' [19980] Failed to execute script 'transmit_can_example' due to unhandled exception!

drebbe-intrepid commented 2 years ago

Please see https://python-ics.readthedocs.io/en/v905.10/#pyinstaller for details on how to use PyInstaller with this module

drebbe-intrepid commented 2 years ago

I'm going to close this out assuming this issue has been resolved. Please feel free to re-open this if not.