I am struggling to find out how to install spatialite for geodjango on windows but I don't know what I am doing wrong. I follow the instructions as per the django page https://docs.djangoproject.com/en/4.0/ref/contrib/gis/install/spatialite/ but the tutorial doesn't say what to do after getting the binarys of spatialite
I have tried to put them everywhere but every time I get the same error:
Exception Value:
Unable to load the SpatiaLite library extension as specified in your SPATIALITE_LIBRARY_PATH setting
I tried to put the mod_spatialite.dll file everywhere and try to set to SPATIALITE_LIBRARY_PATH but it seems I can't get the solution
Any suggestions would be appriciated
Thanks
Extracting the binary into Python installation folder eg: C:\Users\huy\AppData\Local\Programs\Python\Python39.
Then add SPATIALITE_LIBRARY_PATH = "mod_spatialite". This works for me.
Related
I upgraded from django 3.2.5 to django 4.0.4.
I know that this 'django.conf.urls.defaults' must be deprecated.
My problem is that I don't get this error in the development environment but when I push to production, it shows the error. Why is this so???
Also I tried to locate the file so that I can change that line of code to the correct one but could find it's location. It's giving me this path which I can't see how to get to (/workspace/.heroku/python/lib/python3.9/site-packages/django/conf/urls/__init__.py))
After trying all the possibles at my level , I had to revert to django 3.2.5
I try installing QT5 using vcpkg on Windows 10. Unfortunately, when executing ./vcpkg.exe install qt5:x64-windows, I get a long list of errors, must useful information being:
-- Downloading http://download.qt.io/official_releases/qt/5.15/5.15.0/submodules/qtdeclarative-everywhere-src-5.15.0.tar.xz... Failed. Status: 18;"Transferred a partial file"
Failed to download file.
If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
variables to "https://user:password#your-proxy-ip-address:port/".
Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues
Error: Building package qt5-declarative:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: qt5-declarative:x64-windows
Vcpkg version: 2020.06.15-nohash
As I am using the current version and was successful downloading and installing opencv as well as eigen3, I don't think proxy is being an issue.
I was able to download the file itself and hoped, I could manually paste it at the required position in the code (is this possible?) or use a different mirror. I would be glad if someone could give me guydance, as I am new to vcpkg.
Thanks in advance
Edit: As suggested by #drescherjm, I pasted the file in the vcpkg\downloads folder. Now I am looking at the File does not have expected hash error. How do I solve that issue?
I am trying to add geodjango to an already existing django project. I have installed everything that is request e.g postgressql proj geos e.t.c. I can't seem to install gdal on my system though. Everytime I try to run the project in local host it throws back a gdal not found error. I have tried using Osgeo4w, the .whl and the .msi file to try and install gdal. Can't seem to figure out what I'm doing wrong here.
If you use Windos, the easiest way I've found is:
Install Gdal from whl, for examle: [https://www.lfd.uci.edu/~gohlke/pythonlibs/][1], if this link unavailable, the whl you need is not so difficult to find.
Add to settings.py this code(change name of virtual env if need):
OSGEO_VENV = Path(__file__).parents[1] / 'venv/Lib/site-packages/osgeo/'
GEOS_LIBRARY_PATH = str(OSGEO_VENV / 'geos_c.dll')
GDAL_LIBRARY_PATH = str(OSGEO_VENV / 'gdal204.dll')
os.environ["PATH"] += os.pathsep + str(OSGEO_VENV)```
Well i recently put my site into production and this is the last of a few bugs i need to fix. Basically dajaxice/dajaxice.core.js in returning this error in console Uncaught SyntaxError: Unexpected token %. I have placed that particular folder into static and run collect static. The file is fetched however upon opening up the file from the error the django code embedded within the file is not being rendered.
I have placed the file wihtin the head of my base file. Does anyone have any suggestions as to why this is occuring. In my local envionment (development) it is working flawlessly. The only difference i had when installing the two is that i used pip to install it on production and on local i directly downloaded the file and installed it from github. How do i find the version of Dajaxice that is installed?
Does anyone have any ideas as to why this is occuring?
Thanks
I am getting this error which running reportlab with django:
Error was: No module named datacharts
When I checked the
C:\Python26\Lib\site-packages\rlextra\graphics\guiedit folder I dont find datacharts.py but I only find datacharts.pyc and datacharts.pyo
For all other files, even py is there. I tried downloading rlextra again but py for datacharts is still not there.
Is this the right format or I am missing on anything which django is not able to find.
Have you read through the Reportlab installation instructions?
In particular, step 3 tells you how to test your rlextra installation, and step 4 mentions that you will need to install Python Windows extensions in order to use data-aware charts with a database.