run cef python error DLL load failed: Windows cannot verify

912 views
Skip to first unread message

mehrdad....@gmail.com

unread,
Jul 10, 2014, 5:09:33 AM7/10/14
to cefp...@googlegroups.com
im run the project get error
ImportError: DLL load failed: Windows cannot verify the digital signature for this file. A recent hardware or software change might have installed a file that is signed incorrectly or damaged, or that might be malicious software from an unknown source.


Traceback (most recent call last):
File "browser.py", line 9, in <module>
File "cefpython3\__init__.pyc", line 4, in <module>
File "cefpython3\cefpython_py27.pyc", line 12, in <module>
File "cefpython3\cefpython_py27.pyc", line 10, in __load
ImportError: DLL load failed: Windows cannot verify the digital signature for this file. A recent hardware or software change might have installed a file that is signed incorrectly or damaged, or that might be malicious software from an unknown source.

Czarek Tomczak

unread,
Jul 10, 2014, 11:18:57 AM7/10/14
to
That's a strange error, as it says something about signature of the file. It's happening during loading of the cefpython_py27.pyd module. This is not something expected, most probably some OS problem, a virus, or an antivirus causing this. I can only recommend searching google:
https://www.google.com/search?q=%22Windows+cannot+verify+the+digital+signature+for+this+file%22

ing...@beinspired.com

unread,
Jan 27, 2015, 8:17:03 AM1/27/15
to cefp...@googlegroups.com, mehrdad....@gmail.com
I am running into similar problems:

Traceback (most recent call last):
File "app.py", line 7, in <module>
File "cefpython3\__init__.pyc", line 4, in <module>
File "cefpython3\cefpython_py27.pyc", line 12, in <module>
File "cefpython3\cefpython_py27.pyc", line 10, in __load
ImportError: DLL load failed: Kan opgegeven procedure niet vinden.

(Cannot find procedure)

Have you been able to solve this?
Many thanks

Czarek Tomczak

unread,
Jan 27, 2015, 2:35:40 PM1/27/15
to cefp...@googlegroups.com, mehrdad....@gmail.com, ing...@beinspired.com
What Python version are you running, is it Python 2.7 32bit?

Czarek Tomczak

unread,
Jan 27, 2015, 2:37:25 PM1/27/15
to cefp...@googlegroups.com, mehrdad....@gmail.com, ing...@beinspired.com
And what CEF Python version have you installed?

ing...@beinspired.com

unread,
Jan 28, 2015, 5:37:08 AM1/28/15
to cefp...@googlegroups.com, mehrdad....@gmail.com, ing...@beinspired.com
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32

CEF Version: 3.1547.1491 (C:\Python27\Lib\site-packages\cefpython3\README.txt):

The exe compiled with py2exe runs as expected on windows 8 machines.
(after pasting some DLL's into the same directory)

The exe fails on windows 7 machines; additional error alert:
"The procedure entry point I_RpcServerGetAssociationID could not be located in the dynamic link library RPCRT4.dll"

Many thanks for looking into this!

Czarek Tomczak

unread,
Jan 28, 2015, 9:20:34 AM1/28/15
to cefp...@googlegroups.com, mehrdad....@gmail.com, ing...@beinspired.com
Try the latest CEF Python 31.2. Looks like your problem is related to py2exe. You need to make sure that all binaries are included by py2exe. All *.dll *.exe *.pak from the cefpython3/ directory.

ing...@beinspired.com

unread,
Feb 2, 2015, 9:27:05 AM2/2/15
to cefp...@googlegroups.com, mehrdad....@gmail.com, ing...@beinspired.com
I have upgraded to cefpython3-31.2, problem persists.
Executable works fine on windows 8 machines, same error on windows 7.
Could there be any issues with rpcrt4.dll?
I found 4 different versions on my windows 8 machine.

Here's a list of all files in the executable directory for completeness.

Created by py2exe:

app.exe
api-ms-win-core-atoms-l1-1-0.dll
api-ms-win-core-crt-l1-1-0.dll
api-ms-win-core-crt-l2-1-0.dll
api-ms-win-core-delayload-l1-1-1.dll
api-ms-win-core-errorhandling-l1-1-1.dll
api-ms-win-core-file-l1-2-1.dll
api-ms-win-core-handle-l1-1-0.dll
api-ms-win-core-heap-l1-2-0.dll
api-ms-win-core-heap-obsolete-l1-1-0.dll
api-ms-win-core-io-l1-1-1.dll
api-ms-win-core-kernel32-legacy-l1-1-1.dll
api-ms-win-core-libraryloader-l1-2-0.dll
api-ms-win-core-localization-l1-2-1.dll
api-ms-win-core-memory-l1-1-2.dll
api-ms-win-core-processthreads-l1-1-2.dll
api-ms-win-core-profile-l1-1-0.dll
api-ms-win-core-psapi-obsolete-l1-1-0.dll
api-ms-win-core-registry-l1-1-0.dll
api-ms-win-core-string-l1-1-0.dll
api-ms-win-core-string-l2-1-0.dll
api-ms-win-core-string-obsolete-l1-1-0.dll
api-ms-win-core-synch-l1-2-0.dll
api-ms-win-core-sysinfo-l1-2-1.dll
api-ms-win-core-util-l1-1-0.dll
api-ms-win-downlevel-advapi32-l1-1-0.dll
api-ms-win-downlevel-normaliz-l1-1-0.dll
api-ms-win-downlevel-ole32-l1-1-0.dll
api-ms-win-downlevel-shlwapi-l1-1-0.dll
api-ms-win-downlevel-user32-l1-1-0.dll
api-ms-win-downlevel-version-l1-1-0.dll
api-ms-win-security-activedirectoryclient-l1-1-0.dll
api-ms-win-security-base-l1-2-0.dll
api-ms-win-service-management-l1-1-0.dll
bz2.pyd
cefpython3.cefpython_py27.pyd
combase.dll
CRYPT32.dll
dhcpcsvc.DLL
iertutil.dll
IPHLPAPI.DLL
libcef.dll
library.zip
NSI.dll
OLEACC.dll
PSAPI.DLL
pyexpat.pyd
python27.dll
pywintypes27.dll
Secur32.dll
select.pyd
SETUPAPI.dll
unicodedata.pyd
urlmon.dll
USERENV.dll
USP10.dll
w9xpopen.exe
win32api.pyd
win32pipe.pyd
WININET.dll
WTSAPI32.dll
wx._controls_.pyd
wx._core_.pyd
wx._gdi_.pyd
wx._misc_.pyd
wx._windows_.pyd
wxbase30u_net_vc90.dll
wxbase30u_vc90.dll
wxmsw30u_adv_vc90.dll
wxmsw30u_core_vc90.dll
wxmsw30u_html_vc90.dll
_hashlib.pyd
_socket.pyd
_ssl.pyd


Added by me:

cef.pak
cefclient.exe
d3dcompiler_43.dll
d3dcompiler_46.dll
devtools_resources.pak
ffmpegsumo.dll
icudt.dll
libEGL.dll
libGLESv2.dll
subprocess.exe

Czarek Tomczak

unread,
Feb 2, 2015, 10:37:44 AM2/2/15
to cefp...@googlegroups.com, mehrdad....@gmail.com, ing...@beinspired.com
py2exe included many system DLLs. You can't distribute these with your app, first it's not legal, second it won't work. You can't expect a system DLL from one OS (eg. Win8) to work on an another OS (eg. Win7). Your issue is with py2exe and you should ask for help on py2exe forums.

ing...@beinspired.com

unread,
Feb 2, 2015, 10:49:59 AM2/2/15
to cefp...@googlegroups.com, mehrdad....@gmail.com, ing...@beinspired.com
ok... so my problems just got worse.
thank you just the same for explaining.

Czarek Tomczak

unread,
Feb 3, 2015, 3:06:04 PM2/3/15
to mehrdad....@gmail.com, ing...@beinspired.com
In one of projects I recall a similar problem with py2exe including system DLLs. The solution my colleague implemented was to exclude these dlls by hand by creating a list, see http://www.py2exe.org/index.cgi/ExcludingDlls . You can go through all dlls and click on file properties and see if it's signed by Microsoft. If yes then it's most likely a system DLL. The problem with such solution is that such a list might not be up to date when running py2exe on a different computer. Even on that same computer new DLLs might appear after Windows updates.

carlos...@gmail.com

unread,
Jun 6, 2015, 9:00:44 PM6/6/15
to cefp...@googlegroups.com, mehrdad....@gmail.com, ing...@beinspired.com
Apologies for resurrecting an old post, but I just wanted to leave here my experience in case it might help somebody in the future.

I had a similar issue, building an application with wxPython and cefpython using py2exe on a 64bit machine using 32bit python with all python dependencies being 32 bit as well.

I was using py2exe to create the executable which worked on the few systems I had around me, however they were all 64bit Windows. If I tried running it in a 32bit windows computer, the application would throw a similar exception as the one listed here, except without the "digital signature" part. For some reason, if I copied the cefpython dlls into the "cefpython3" folder inside the executable directory (they were originally copied onto the root of the executable folder) then the aplication would launch without any error displayed on the command line interface but the CEF panel would never really render anything. This really threw me off, as there was no other indication of any problems with the application, all the other subprocesses were running correctly and the wx window was responsive.

Turns out py2exe was copying almost 50 windows dlls over, and after they are removed (leaving the cefpython dlls in the root of the executable directory) like you guys mentioned, it seems to work fine in Windows 7 and 8, 32 and 64 bits.


Hopefully this might help somebody with a similar issue.

ing...@beinspired.com

unread,
Jul 15, 2015, 8:21:22 AM7/15/15
to cefp...@googlegroups.com, mehrdad....@gmail.com, carlos...@gmail.com
apologies accepted ;)
works like a charm, tnx!!

ifin...@gmail.com

unread,
Sep 14, 2015, 5:04:58 AM9/14/15
to CEF Python, mehrdad....@gmail.com, ing...@beinspired.com, carlos...@gmail.com

> Turns out py2exe was copying almost 50 windows dlls over, and after they are removed (leaving the cefpython dlls in the root of the executable directory) like you guys mentioned, it seems to work fine in Windows 7 and 8, 32 and 64 bits.
>
I removed these DLL files :
dhcpcsvc.dll
IPHLPAPI.dll
NSI.dll
OLEACC.dll
USERENV.dll
USP10.dll
WINHTTP.dll
WININET.dll
WINNSI.dll
WTSAPI32.dll
and then.... I have my own browser with great feature :)
thanks for your help

geli...@gmail.com

unread,
Jan 20, 2017, 4:36:20 AM1/20/17
to CEF Python
urlmon.dll should also be removed, otherwise it does not work on Win8.1 Pro.
Reply all
Reply to author
Forward
0 new messages