alejandroautalan / pygubu-designer

A simple GUI designer for the python tkinter module
GNU General Public License v3.0
803 stars 98 forks source link

Exception: Class "tk.Toplevel" not mapped, when using PyInstaller #143

Closed danidask closed 2 years ago

danidask commented 2 years ago

Tring to follow the example in /examples/integration_with_pyinstaller/ It works when executed from python myapp.py but not from the executable .\myapp.exe

> .\myapp.exe
Traceback (most recent call last):
  File "myapp.py", line 221, in <module>
  File "myapp.py", line 26, in __init__
  File "pygubu\builder.py", line 161, in get_object
  File "pygubu\builder.py", line 208, in _realize
Exception: Class "tk.Toplevel" not mapped
[24272] Failed to execute script 'myapp' due to unhandled exception!

Python 3.10.5

alejandroautalan commented 2 years ago

Hello @danidask, thanks for trying pygubu.

What version of pygubu and pyinstaller are you using? Let me know.

Regards Alejandro A.

danidask commented 2 years ago

pygubu-0.24 pygubu-designer-0.29 pyinstaller-5.3

Thanks @alejandroautalan

alejandroautalan commented 2 years ago

Hello, I changed the spec file for pygubu 0.24.

https://github.com/alejandroautalan/pygubu-designer/blob/c470ba65312bb707b0ea78427f3f1f239623ae76/examples/integration_with_pyinstaller/myapp.spec#L6-L21

Try again and let me know. Regards Alejandro A.

gwelch-contegix commented 2 years ago

@alejandroautalan would you accept a PR to add a pyinstaller hook to this repository? Or I should say the pygubu repository

alejandroautalan commented 2 years ago

@alejandroautalan would you accept a PR to add a pyinstaller hook to this repository? Or I should say the pygubu repository

Hello, @gwelch-contegix. I think it should be in the pygubu repository. Yes I would accept it.

gwelch-contegix commented 2 years ago

PR submitted alejandroautalan/pygubu#266

danidask commented 2 years ago

Yes, it works now. Thanks for your time and for this awesome project.