Opened 7 years ago

Closed 7 years ago

#9008 closed (fixed)

'lib_name' is not defined error on Windows when `GDAL_LIBRARY_PATH` is set

Reported by: kitlycol@… Owned by: jbronn
Component: GIS Version: 1.0
Severity: Keywords: lib_name GDAL_LIBRARY_PATH gdal gis
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by jbronn)

43 if os.name == 'nt':
44    from ctypes import WinDLL
45    lwingdal = WinDLL(lib_name)


'lib_name' is not defined

Attachments (1)

gdal_win32_lib_path.diff (420 bytes) - added by jbronn 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

43 if os.name == 'nt':
44 from ctypes import WinDLL
45 lwingdal = WinDLL(lib_name)

'lib_name' is not defined

comment:2 Changed 7 years ago by jbronn

  • Description modified (diff)
  • Keywords GDAL_LIBRARY_PATH gdal gis added
  • Owner changed from nobody to jbronn
  • Summary changed from libgdal/__init__.py name 'lib_name' is not defined on windows to 'lib_name' is not defined error on Windows when `GDAL_LIBRARY_PATH` is set
  • Triage Stage changed from Unreviewed to Accepted

Changed 7 years ago by jbronn

comment:3 Changed 7 years ago by jbronn

I'll commit that patch later; it should fix the problem. Another workaround is to not use GDAL_LIBRARY_PATH -- just add the GDAL directory to your Windows PATH.

comment:4 Changed 7 years ago by terry

It seems both GEOS_LIBRARY_PATH, GDAL_LIBRARY_PATH variable not use on windows. just add GEOS, GDAl directory to Windows PATH. that worked well

comment:5 Changed 7 years ago by jbronn

  • Resolution set to fixed
  • Status changed from new to closed

(In [9036]) Fixed #9008 -- now use the correct library path for loading the WinDLL instance of the GDAL library.

Note: See TracTickets for help on using tickets.
Back to Top