classification
Title: pyodbc dll load failed
Type: compile error Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: eryksun, nf00038, xtreak
Priority: normal Keywords:

Created on 2019-12-22 17:31 by nf00038, last changed 2019-12-22 20:23 by eryksun. This issue is now closed.

Files
File name Uploaded Description Edit
DLL.PNG nf00038, 2019-12-22 17:31
Messages (3)
msg358796 - (view) Author: Neil Faulkner (nf00038) Date: 2019-12-22 17:31
Please can someone advise as to the root cause of this error?
msg358797 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-12-22 18:28
This is a tracker for CPython issues. Please use the bug tracker for pyodbc or other forums like stack overflow for better solutions.
msg358798 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2019-12-22 20:23
This may be due to changes regarding DLL dependency resolution in 3.8. If so, you can find the missing DLL using Process Monitor, configured to monitor file access in python.exe and pythonw.exe. Add the DLL's directory to the search path via os.add_dll_directory [1] before importing from pyodbc. 

The developers of pyodbc should be directed to the porting notes for the DLL search requirements in 3.8 [2]. The interpreter and ctypes no longer support the old DLL search path that includes the working directory and PATH [3].

[1] https://docs.python.org/3/library/os.html#os.add_dll_directory
[2] bpo-36085-whatsnew">https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew
[3] https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order
History
Date User Action Args
2019-12-22 20:23:41eryksunsetnosy: + eryksun
messages: + msg358798
2019-12-22 18:28:49xtreaksetstatus: open -> closed

nosy: + xtreak
messages: + msg358797

resolution: third party
stage: resolved
2019-12-22 17:31:20nf00038create