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
Related
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.
Basically, I am getting a unreasonable amount of errors using these libraries:
django==1.4.3
pyelasticsearch==0.6
simplejson==3.3.0
django-haystack==2.1.0
The errors I get are:
From python2.7/site-packages/haystack/query.py:
index_queryset() got an unexpected keyword argument 'using'
I just remove this and it works locallay
/srv/www/projects/k-state-union/lib/haystack/backends/elasticsearch_backend.py:
raise MissingDependency("The 'elasticsearch' backend requires the installation of 'pyelasticsearch'. Please refer to the documentation.")
This error occurs when pyelasticsearch fails to be imported. If I let it fail naturally:
/srv/www/.virtualenvs/k-state-union/lib/python2.6/site-packages/pyelasticsearch/client.py:
from simplejson import JSONDecodeError
Which works in the python interpreter.
The errors seem to indicate that I am not using the intended versions of pyelasticsearch and haystack. What do I need to do to get this up and running?
There are two different python libraries for Elasticsearch out there. I switched from pyelasticsearch to elasticsearch and it worked.
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'm using Gramps 3.3.1 under Ubuntu 12.04 and trying to in Django Export/Import. The install is okay, but when I look at the installed addons, it says that it failed, with reason: "No module named web.settings".
I cann't for the life of me figure out how to fix this. I'm assuming that it's this line in the python script:
import web.settings as default_settings
Anyone have any ideas? I'm trying to get this data out and into a MySQL database, but I can't seem to.
Thanks!
When you run into an error where Python tells you "No module named blah" it really means it can't find "blah".
I would check your pythonpath and the filesystem permissions on the stuff in your path.
Edit
Your issue seems to be a known issue: http://www.gramps-project.org/bugs/view.php?id=5464
It's caused by not running Gramps from source, near as I can tell. It doesn't look like a Python Path issue, so much as the Gramps Django devs making assumptions where your Django settings would be (but I could be wrong).
As for Python Path, there's plenty of resources describing how to. The simplest way to check your Python path is to run echo $PYTHONPATH in a terminal. If you don't see it there, Python might not find it.
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.