python-tkextrafont icon indicating copy to clipboard operation
python-tkextrafont copied to clipboard

Issue when trying to package with pyinstaller

Open magik3r opened this issue 2 years ago • 2 comments

When attempting to package a .py script into an exe using --onefile the executable .exe file gives the following error: I have tried using --add-data-file "C:/(path to python site packages)/tkextrafont;tkextrafont" to no avail.

Traceback (most recent call last):
  File "tkextrafont\__init__.py", line 118, in load
    window.tk.eval("package require extrafont")
_tkinter.TclError: extra characters after close-brace

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "gui.py", line 49, in <module>
  File "tkextrafont\__init__.py", line 90, in __init__
    load(root)
  File "tkextrafont\__init__.py", line 120, in load
    if "libfontconfig" in e.message:
                          ^^^^^^^^^
AttributeError: 'TclError' object has no attribute 'message'

Any ideas as to why this happens?

Sorry in advance if this is out of your scope.

magik3r avatar Aug 28 '23 19:08 magik3r

Probably the same as #9

This is a bug though

rdbende avatar Mar 02 '24 08:03 rdbende

This might help https://discuss.python.org/t/attributeerror-tclerror-object-has-no-attribute-message/29895

How to get exception message in Python properly - Stack Overflow @rdbende

Harshil783 avatar Mar 02 '24 09:03 Harshil783