Comments (2)
I'm not sure I understand, why did you have the OSError in the first place?
from django-geojson.
I'm on Windows 10 Pro, build 19045.4474 (not WSL)
Let's say I create a virtual environment and activate it, and pip install django and django-geojson.
Then I start a django project and add 'djgeocad' to INSTALLED_APPS.
I migrate and run the server, that crashes. This is the error I get:
Exception in thread django-main-thread:
Traceback (most recent call last):
[...]
File "D:\venvs\test-djgeojson\env\Lib\site-packages\djgeojson\templatetags\geojson_tags.py", line 8, in <module>
from django.contrib.gis.db.models.fields import GeometryField
File "D:\venvs\test-djgeojson\env\Lib\site-packages\django\contrib\gis\db\models\__init__.py", line 3, in <module>
import django.contrib.gis.db.models.functions # NOQA
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\venvs\test-djgeojson\env\Lib\site-packages\django\contrib\gis\db\models\functions.py", line 3, in <module>
from django.contrib.gis.db.models.fields import BaseSpatialField, GeometryField
File "D:\venvs\test-djgeojson\env\Lib\site-packages\django\contrib\gis\db\models\fields.py", line 3, in <module>
from django.contrib.gis import forms, gdal
File "D:\venvs\test-djgeojson\env\Lib\site-packages\django\contrib\gis\forms\__init__.py", line 3, in <module>
from .fields import ( # NOQA
File "D:\venvs\test-djgeojson\env\Lib\site-packages\django\contrib\gis\forms\fields.py", line 2, in <module>
from django.contrib.gis.gdal import GDALException
File "D:\venvs\test-djgeojson\env\Lib\site-packages\django\contrib\gis\gdal\__init__.py", line 29, in <module>
from django.contrib.gis.gdal.datasource import DataSource
File "D:\venvs\test-djgeojson\env\Lib\site-packages\django\contrib\gis\gdal\datasource.py", line 41, in <module>
from django.contrib.gis.gdal.driver import Driver
File "D:\venvs\test-djgeojson\env\Lib\site-packages\django\contrib\gis\gdal\driver.py", line 5, in <module>
from django.contrib.gis.gdal.prototypes import ds as vcapi
File "D:\venvs\test-djgeojson\env\Lib\site-packages\django\contrib\gis\gdal\prototypes\ds.py", line 10, in <module>
from django.contrib.gis.gdal.libgdal import lgdal
File "D:\venvs\test-djgeojson\env\Lib\site-packages\django\contrib\gis\gdal\libgdal.py", line 69, in <module>
lgdal = CDLL(lib_path)
^^^^^^^^^^^^^^
File "C:\Users\Andrea\AppData\Local\Programs\Python\Python312\Lib\ctypes\__init__.py", line 379, in __init__
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 127] The specified procedure could not be found
It is probably a configuration error.
If you go to djgeojson/templatetags/geojson_tags.py from line 7 to 12 you find this:
try:
from django.contrib.gis.db.models.fields import GeometryField
from django.contrib.gis.geos import GEOSGeometry
except (ImportError, ImproperlyConfigured):
from ..nogeos import GEOSGeometry
from ..fields import GeometryField
If you add the OSError to the exceptions (same for the other two files in the opening message of the issue), everything works fine.
Thank you for your help
from django-geojson.
Related Issues (20)
- UWSGI crashes after installing django-geojson HOT 2
- 'Shop' object has no attribute 'geom'
- JSONFormField is removed from jsonfield HOT 1
- Leaflet widget is not rendered automatically for forms.Forms HOT 4
- Generate FeatureCollection GeoJSON from queryset in the database
- Daes it make sense to improve validators process? HOT 2
- jsonfield dependency still required? HOT 1
- Error creating geometry from value 'null' (String input unrecognized as WKT EWKT, and HEXEWKB.) HOT 2
- Make 'name' the default for 'crs_type' HOT 3
- Leaflet warning when using own widget HOT 1
- Migration breakage when switching from 'jsonfield' to django.db.models.JSONField
- Support Request: Trying to map PointFields with no success HOT 2
- GeoJSONLayerView and LoginRequiredMixin HOT 5
- Django 2.0: AttributeError: 'CharField' object has no attribute 'rel' HOT 3
- How I Can Add Circle Support In Geometry Type HOT 1
- Support Model methods with no parameters HOT 1
- Serving geoJson with custom coordinates HOT 1
- Makemigrations Failing - Could not find GDAL. HOT 1
- Object has no attribute 'geom' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-geojson.