Skip to content Skip to sidebar Skip to footer

Keep Getting A 'filedialog' Error After Creating Executable With Cx_freeze

I am trying to create an executable using cx_Freeze from a python script and it appears that certain portions of the tkinter module are not getting loaded into the executable file.

Solution 1:

For some reason, I had to import the 'filedialog' and 'messagebox' submodules explicitly in the script I was freezing.

import tkinter.filedialogas fdialog
import tkinter.messageboxas msgbox
import tkinter

While 'Label', 'Button', 'Frame', 'Entry', etc. worked fine, who knows how many others must be imported in that fashion. Hope this helps someone.

Post a Comment for "Keep Getting A 'filedialog' Error After Creating Executable With Cx_freeze"