From a285d9ebb02a68c96b29391dc1999c2f5d66dbe8 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 9 Jul 2023 19:12:36 +0800 Subject: [PATCH] Improved OSGeo4W import --- stude/config/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stude/config/settings.py b/stude/config/settings.py index 14c363b..07a352f 100644 --- a/stude/config/settings.py +++ b/stude/config/settings.py @@ -54,7 +54,8 @@ else: # Will need to install OSGeo4W for this! if os.name == 'nt': OSGEO4W = r"C:\OSGeo4W" - assert os.path.isdir(OSGEO4W), "Directory does not exist: " + OSGEO4W + if not os.path.isdir(OSGEO4W): + OSGEO4W += '64' os.environ['OSGEO4W_ROOT'] = OSGEO4W os.environ['GDAL_DATA'] = "C:\Program Files\GDAL\gdal-data" os.environ['PROJ_LIB'] = OSGEO4W + r"\share\proj"