Closed Antman261 closed 7 years ago
That's simply a warning that - while annoying - you can safely ignore. If the log spam that code generates annoys you enough you can adjust your logging level by settings the cities
logger to above WARNING
(eg: ERROR
or CRITICAL
). See the Python logging cookbook for more on logging.
I am working on fixing this. See #161 for details and progress.
Can you check my new-stuff
branch to see if it generates that much log spam?
I fixed the database query in ba2150ce86e4b0a019114748ad39d990a3f1e51f and restricted the exceptions we ignore in 1e6dffb2231183833b4e0bb51e732264a6aa5b16.
Thanks!
I just merged #161 and released version 0.5.0.4 to PyPI which should fix these issues.
Closing. Please upgrade and reopen this issue if it isn't fixed. Thanks!
Checklist
master
branch of django-cities.Steps to reproduce
Import with default values in Django1.10 + GeoDjango + PostGIS.
Expected behavior
Useful exception logging.
Actual behavior
When importing, I was getting a lot of the following errors logged:
Exception ignored in: District: Eden Glen Ext 60: DB backend does not support native '.distance(...)' query falling back to two degree search
When I checked the code throwing this error I found this:
I checked that I could use
Distance
with the following: