gdal204.dll not loading win10 amd64 python 3.7.1, django 2.1.7
|Reported by:||rhaimann||Owned by:|
|Version:||Keywords:||OSGeo4W, gdal204, WinError, Django, Python|
Loaded OSGeo4W64 on Windows 10 AMD 64 machine running Python 3.7.1 Django 2.1.7. Could not load gdal204.dll. The file name was being read correctly. Updated lib_names in lidgdal.py to include gdal204 and gdal203 ( lib_names = ['gdal204','gdal203','gdal202', 'gdal201', 'gdal20', 'gdal111', 'gdal110', 'gdal19']). In settings.py set GDAL_LIBRARY_PATH to point to the full path for gdal204. Put in a print statements in init.py for self.name, the path and filename were being read. Python kept throwing an error, from the Windows OS either WinError 126 or WinError 127 depending on how I had the paths set up. Put in an entirely fresh virtual environment. Deleted earlier versions of Python before doing so. Same errors kept being thrown.
Changed the GDAL_LIBRARY_PATH to point to gdal111 that was included in the install. This stopped throwing the error so the Django server would start.
There seems to be some issue with the compile of gdal204.dll. While the file is read, internal functions seem to be not finding something that is being called. No further detail is provided in the error message. Rather than recompiling the source under MS C++ 2017, going to move forward with gdal111.dll for now. Not entirely sure what the issue is.
Hope this helps.