I just solved this for myself by switching to 32-bit versions of Python and OSGeo4Win
On Thursday, April 11, 2019 at 8:31:47 AM UTC-7, Dieu Donne Megnassan wrote:
-- On Thursday, April 11, 2019 at 8:31:47 AM UTC-7, Dieu Donne Megnassan wrote:
I need help to figure this out. I'm a GeoDjango newbie and I've been trying to setup the geograpic libraries to no avail.I am following the documentation for windows all right, but everytime I runserver after setting GDAL_LIBRARY_PATH, I get this error:PS C:\users\charming\desktop\web\heritage\muina> python manage.py runserver Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x000002B4FE44AEA0>Traceback (most recent call last):File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\utils\autoreload.py", line 225, in wrapper fn(*args, **kwargs)File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\core\management\ commands\runserver.py", line 109, in inner_run autoreload.raise_last_exception() File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\utils\autoreload.py", line 248, in raise_last_exception raise _exception[1]File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\core\management\__init_ _.py", line 337, in execute autoreload.check_errors(django.setup)() File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\utils\autoreload.py", line 225, in wrapper fn(*args, **kwargs)File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\apps\registry.py", line 120, in populate app_config.ready()File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\contrib\admin\apps.py", line 24, in ready self.module.autodiscover()File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\contrib\admin\__init__. py", line 26, in autodiscover autodiscover_modules('admin', register_to=site)File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\utils\module_loading. py", line 47, in autodiscover_modules import_module('%s.%s' % (app_config.name, module_to_search))File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\importlib\__init_ _.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_importFile "<frozen importlib._bootstrap>", line 983, in _find_and_loadFile "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 677, in _load_unlockedFile "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removedFile "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\contrib\gis\admin\__ init__.py", line 5, in <module> from django.contrib.gis.admin.options import GeoModelAdmin, OSMGeoAdmin File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\contrib\gis\admin\ options.py", line 2, in <module> from django.contrib.gis.admin.widgets import OpenLayersWidget File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\contrib\gis\admin\ widgets.py", line 3, in <module> from django.contrib.gis.gdal import GDALExceptionFile "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\contrib\gis\gdal\__ init__.py", line 28, in <module> from django.contrib.gis.gdal.datasource import DataSource File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\contrib\gis\gdal\ datasource.py", line 39, in <module> from django.contrib.gis.gdal.driver import DriverFile "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\contrib\gis\gdal\ driver.py", line 5, in <module> from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as rcapi File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\contrib\gis\gdal\ prototypes\ds.py", line 9, in <module> from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\site-packages\ django\contrib\gis\gdal\ libgdal.py", line 47, in <module> lgdal = CDLL(lib_path)File "C:\Users\Charming\AppData\Local\Programs\Python\ Python37\lib\ctypes\__init__. py", line 356, in __init__ self._handle = _dlopen(self._name, mode)OSError: [WinError 126] The specified module could not be found
I think it has something to do with my python, idk.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bc59e8b8-106d-4cc1-a6e9-b0fb5a0b9c6c%40googlegroups.com.
No comments:
Post a Comment