I installed CEF Python (bindings for the Chromium Embedded Framework) in a virtual environment with Python 3.9.13, then upgraded pip and installed cefpython3 and PyInstaller, but it doesn’t work.
When I ran:
from cefpython3 import cefpython as cef
import sys
sys.excepthook = cef.ExceptHook
cef.Initialize()
like in the official tutorial, it gave me:
[0716/151346.576:ERROR:main_delegate.cc(710)] Could not load locale pak for en-US
[0716/151346.582:ERROR:main_delegate.cc(717)] Could not load cef.pak
[0716/151346.584:ERROR:main_delegate.cc(734)] Could not load cef_100_percent.pak
[0716/151346.585:ERROR:main_delegate.cc(743)] Could not load cef_200_percent.pak
[0716/151346.587:ERROR:main_delegate.cc(753)] Could not load cef_extensions.pak
[0716/151346.777:ERROR:content_client.cc(272)] No data resource available for id 101
I tried this and this. The last is the same error I have. From hook-cefpython3.py I get:
1955 INFO: CEF Python package directory: P:PythonWorkFlow = End Item Py3.9libsite-packagescefpython3
1957 INFO: Exclude cefpython3 module: cefpython3.cefpython_py27
1957 INFO: Exclude cefpython3 module: cefpython3.cefpython_py34
1958 INFO: Exclude cefpython3 module: cefpython3.cefpython_py35
1958 INFO: Exclude cefpython3 module: cefpython3.cefpython_py36
1959 INFO: Exclude cefpython3 module: cefpython3.cefpython_py37
1959 INFO: Exclude cefpython3 module: cefpython3.cefpython_py38
1961 INFO: Include cefpython3 data: cef.pak
1969 INFO: Include cefpython3 data: cef_100_percent.pak
1971 INFO: Include cefpython3 data: cef_200_percent.pak
1973 INFO: Include cefpython3 data: cef_extensions.pak
1974 INFO: Include cefpython3 data: chrome_elf.dll
1976 INFO: Include cefpython3 data: d3dcompiler_43.dll
1978 INFO: Include cefpython3 data: d3dcompiler_47.dll
1980 INFO: Include cefpython3 data: devtools_resources.pak
1983 INFO: Include cefpython3 data: icudtl.dat
1985 INFO: Include cefpython3 data: libcef.dll
1986 INFO: Include cefpython3 data: libEGL.dll
1988 INFO: Include cefpython3 data: libGLESv2.dll
1990 INFO: Include cefpython3 data: License
1991 INFO: Include cefpython3 data: LICENSE.txt
1992 INFO: Include cefpython3 data: msvcp100.dll
1993 INFO: Include cefpython3 data: msvcp140.dll
1994 INFO: Include cefpython3 data: msvcp90.dll
1996 INFO: Include cefpython3 data: natives_blob.bin
1996 INFO: Include cefpython3 data: README.txt
1997 INFO: Include cefpython3 data: snapshot_blob.bin
1998 INFO: Include cefpython3 data: subprocess.exe
1999 INFO: Include cefpython3 data: v8_context_snapshot.bin
2000 INFO: Include cefpython3 data: widevinecdmadapter.dll
2007 INFO: Include cefpython3 data: locales/am.pak
2007 INFO: Include cefpython3 data: locales/ar.pak
2008 INFO: Include cefpython3 data: locales/bg.pak
2008 INFO: Include cefpython3 data: locales/bn.pak
2009 INFO: Include cefpython3 data: locales/ca.pak
2010 INFO: Include cefpython3 data: locales/cs.pak
2011 INFO: Include cefpython3 data: locales/da.pak
2011 INFO: Include cefpython3 data: locales/de.pak
2011 INFO: Include cefpython3 data: locales/el.pak
2011 INFO: Include cefpython3 data: locales/en-GB.pak
2012 INFO: Include cefpython3 data: locales/en-US.pak
.........
Is it asking to include these files? In P:PythonWorkFlow = End Item Py3.9libsite-packagescefpython3
I do have the .pak files, so what exactly is the problem?
In the hook file I got:
# The .pak files in cefpython3/locales/ directory
locales_dir = os.path.join(CEFPYTHON3_DIR, "locales")
assert os.path.exists(locales_dir), "locales/ dir not found in cefpython3"
for filename in os.listdir(locales_dir):
logger.info("Include cefpython3 data: %s/%s" % (
os.path.basename(locales_dir), filename))
ret.append((os.path.join(locales_dir, filename),
"locales"))
return ret
Printing locales_dir
returns the correct path. I printed each single path of all scripts of the module and they are correct.
0