Description
I describe the situation here, as i really don't understand what's happenning.
If you have a key to help.
This is only windows env pb.
My env : Python 3.8 (with only coverage and pipenv) + GDal installed (with django and postgis and so on, but this happens in a simple config) + PostGreSQL.
the standard behaviour
My test file testgdal.py
from ctypes import CDLL
import traceback
d = "C:/OSGeo4W/bin/gdal303.dll"
try:
CDLL(d)
except FileNotFoundError as e:
print(f'Lib {d} is not found')
except Exception as e:
print(f'Other error : {e}')
print(traceback.format_exc())
else:
print(f"OK ! Ret is {d}")
Output from python testgdal.py is :
OK ! Ret is C:/OSGeo4W/bin/gdal303.dll
If a wrong path or dll is missing, normal, return is for example :
Lib C:/unknown.dll is not found
If a use another dll, like C:/OSGeo4W/bin/tiff.dll, ir works with coverage run testgday.py :
OK ! Ret is C:/OSGeo4W/bin/tiff.dll
This is my expected behaviour, which is working in django, pytest environment.
The coverage error ith the gdal dll
Now, when i try to use a coverage run testgdal.py,
it fails.
Other error : [WinError 127] La procédure spécifiée est introuvable
Traceback (most recent call last):
File "testgdal.py", line 7, in <module>
CDLL(d)
File "c:\users\sando\appdata\local\programs\python\python38\lib\ctypes\__init__.py", line 461, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 127] La procédure spécifiée est introuvable
And the windows system show me a modal box
python.exe > missing entry point for sqllite3_column_origin_name in dll ..gdal303.dll
My question
How come coverage run this error with sqllite ?