Closed 1893945 closed 1 year ago
Hello @1893945 thanks for trying pygubu.
I tried to reproduce the error but I couldn't.
OS: Windows 10 Python: Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] on win32 pyinstaller==5.4.1 pyinstaller-hooks-contrib==2022.10 pygubu==0.25 pygubu-designer==0.30
With your example:
pyinstaller --add-data "tools2.ui;." -D tktools2.py
Running the executable, no error is shown.
What python version are you using?
Regards Alejandro A.
Python 3.8.10
your build/tktool2/PYZ-00.toc file have pygubu.plugins.* ?
When I run pyinstaller, system show: WARNING: discover_hook_directories: Failed to process hook entry point 'hook-dirs = pygubu.__pyinstaller:get_hook_dirs': TypeError: 'type' object is not subscriptable
I run pygubu/pyinstaller/init__.py:
Oh, I will try with your python version.
In the meantime, can you test if it works with a spec file similar to this one ?
Regards Alejandro A.
OK, It is valid to use spec file
Great!
Hi, when I Run executable file by pyinstaller generated, the erroe showed “ModuleNotFoundError: No module named 'Notebook'”. error tip:
[<class 'ModuleNotFoundError'>] No module named 'Notebook'
Traceback (most recent call last): File "pygubu\builder.py", line 193, in _import_class File "importlib__init__.py", line 127, in import_module File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'ttk'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "pygubu\builder.py", line 201, in _import_class File "importlib__init__.py", line 127, in import_module File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'ttk'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "tktools.py", line 235, in
File "tktools.py", line 28, in init
File "pygubu\builder.py", line 167, in get_object
File "pygubu\builder.py", line 215, in _realize
File "pygubu\builder.py", line 204, in _import_class
File "importlib__init__.py", line 127, in import_module
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'Notebook'
File "tktools.py", line 28 code is: self.mainwindow = builder.get_object("notebook1", master)
this is the minimum example. see the attach files: tk_tools.zip
pyinstaller --add-data "tools2.ui;." -D tktools2.py
pygubu 0.25 pygubu-designer 0.30 pyinstaller 5.4.1 pyinstaller-hooks-contrib 2022.10
note: I debugged and found that it seemed to be PluginManager.py "for , name, in iter_namespace(pygubu.plugins):" not executed, when run exe file.
so, How should I deal with this problem?
thanks