0

I've been developing a Tkinter GUI application with CEFPython for browser integration. My application runs smoothly when executed as a Python script. However, I've been running into issues when trying to compile it into a standalone executable using PyInstaller.

Here's the PyInstaller command I've been using: pyinstaller -i assets/icon.ico -F -w bot.py

After running this command, PyInstaller successfully creates an executable in the dist directory. When I run the executable, however, I receive an error message in the debug.log file located in the same directory as the executable. The error message is as follows: ERROR:icu_util.cc(133)] Invalid file descriptor to ICU data received.

I've tried researching solutions online, but so far I've come up empty. I'd greatly appreciate any advice or suggestions on how to resolve this issue.

Olivier Neve
  • 299
  • 10
Cassano
  • 253
  • 5
  • 36

1 Answers1

0

I was having the same issue what it came to be was the files icudtl.dat and natives_blob.bin needed to be in the dist/{your_package}/cefpython3 folder

what I ended up doing for now is adding two lines to the Analysis.datas list

cef = get_cefpython_path()
datas = [
 ...
 ("%s/icudtl.dat" % cef, "cefpython3"),
 ("%s/natives_blob.bin" % cef, "cefpython3")
] 
a = Analysis(
 ...
 datas=datas,
)

credit failed to create executable with pyinstaller and cefpython on Linux (Invalid file descriptor to ICU data)