icu_util.cc(133) Invalid file descriptor to ICU data received when used pyinstaller

3,079 views
Skip to first unread message

Buff

unread,
Dec 19, 2018, 6:07:40 AM12/19/18
to CEF Python

im use window 10 x64
and

 [hello_world.py] CEF Python 66.0
 [hello_world.py] Chromium 66.0.3359.181
 [hello_world.py] CEF 3.3359.1774.gd49d25f
 [hello_world.py] Python 3.7.1 32bit

this my .spec file(i thot not related with it)

block_cipher = None
a = Analysis(['__main__.py'],
             pathex=["C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\10.0.17763.0\\ucrt\\DLLs\\x86"],
             binaries=[],
             datas=[],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          [],
          name='__main__',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          runtime_tmpdir=None,
          console=False )


this my __main__.py file



# Hello world example. Doesn't depend on any third party GUI framework.
# Tested with CEF Python v57.0+.
import json
from cefpython3 import cefpython as cef
import platform
import sys
def main():
check_versions()
sys.excepthook = cef.ExceptHook # To shutdown all CEF processes on error
cef.Initialize()
cef.CreateBrowserSync(url="https://www.google.com/",
window_title="Hello World!")
cef.MessageLoop()
cef.Shutdown()
def check_versions():
ver = cef.GetVersion()
print("[hello_world.py] CEF Python {ver}".format(ver=ver["version"]))
print("[hello_world.py] Chromium {ver}".format(ver=ver["chrome_version"]))
print("[hello_world.py] CEF {ver}".format(ver=ver["cef_version"]))
print("[hello_world.py] Python {ver} {arch}".format(
ver=platform.python_version(),
arch=platform.architecture()[0]))
assert cef.__version__ >= "57.0", "CEF Python v57.0+ required to run this"
if __name__ == '__main__':
main()




i get this when i open pyinstaller builded exe file
[1219/004030.604:ERROR:icu_util.cc(133)] Invalid file descriptor to ICU data received.

I tried: https://github.com/cztomczak/cefpython/blob/master/examples/pyinstaller/README-pyinstaller.mdstep by step , but still get this error

and also , i spend whole day use google search , but still not find solution(actually find out some solution, but that work for Linux or Mac)

i tried lower version Python 3.6.7 but still get this error

i dont know this error is about my computer or dev environment?

Czarek Tomczak

unread,
Dec 19, 2018, 6:24:15 AM12/19/18
to CEF Python
What version of PyInstaller?

Does the original unmodified pyinstaller example work fine?

Buff

unread,
Dec 19, 2018, 6:29:09 AM12/19/18
to CEF Python
C:\Users\Buff\Desktop\test>pyinstaller -v  3.4   (ty u comment btw)

Czarek Tomczak

unread,
Dec 19, 2018, 6:32:23 AM12/19/18
to CEF Python
See the pyinstaller example README for specific instructions. Install pyinstaller 3.2.1 as it is recommended, other versions were not tested.
Message has been deleted
Message has been deleted

Buff

unread,
Dec 19, 2018, 7:02:45 AM12/19/18
to CEF Python
i try pyinstaller3.2.1 and my python back to 3.5.4 but still get this error.


Buff

unread,
Dec 19, 2018, 7:49:19 AM12/19/18
to CEF Python
tried  https://github.com/cztomczak/cefpython/blob/master/examples/pyinstaller/README-pyinstaller.md and working right now,
I thought related with .spec config . but currently i dont know which one
is tough for me , cuz im noob, ill learning it

Abhay Gaur

unread,
Mar 26, 2022, 5:09:47 AM3/26/22
to CEF Python

I'm facing the same issue, Czarek, could you please help us.

八月

unread,
Jul 8, 2022, 5:16:58 AM7/8/22
to CEF Python

I got the same issue. I solved it by copying "icudtl.dat、locales、cef.pak、cef_100_percent.pak……" into the .exe directory.

we can use 'pip show cefpython3' to find out where the files are. For example, my cefpython3 path is "c:\users\baight\appdata\local\programs\python\python38\lib\site-packages". So we can find the files in "c:\users\baight\appdata\local\programs\python\python38\lib\site-packages\cefpython3".

I am not sure which files should copy, so I copied all of them, except "_pycache__"、"examples"、"swiftshader"、"__init__.py"、"debug.log"、"License"、"README.txt"……, that obviously not need.

Reply all
Reply to author
Forward
0 new messages