Opened 15 years ago

Closed 15 years ago

Last modified 12 years ago

#10395 closed (fixed)

GeoIP broken with [9945]

Reported by: anonymous Owned by: nobody
Component: GIS Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

GeoIP was broken by [9945]

>>> from django.contrib.gis.utils.geoip import GeoIP
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/gis/utils/geoip.py", line 45, in <module>
    if not settings._target: settings.configure()
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/utils/functional.py", line 273, in __getattr__
    return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute '_target'
>>> from django.contrib.gis.utils import GeoIP
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: cannot import name GeoIP

Change History (10)

comment:1 by anonymous, 15 years ago

comment:2 by Malcolm Tredinnick, 15 years ago

Resolution: fixed
Status: newclosed

This was fixed in r9953.

comment:3 by anonymous, 15 years ago

I'm still getting this error using r9959.

comment:4 by anonymous, 15 years ago

Resolution: fixed
Status: closedreopened

comment:5 by Malcolm Tredinnick, 15 years ago

Resolution: fixed
Status: reopenedclosed

(In [9960]) Fixed #10395 -- Fixed more fallout from r9945.

(Simultaneously, stop django.contrib.gis using some internal attribute when
there's a perfectly good public property available to do the same thing.)

comment:6 by Malcolm Tredinnick, 15 years ago

(In [9962]) [1.0.X] Final pieces (he says, hopefully) of r9945 changes.

Fixed "django-admin.py diffsettings" and some GeoDjango stuff.
Refs #10395.

Backport of r9960 and r9961 from trunk.

comment:7 by Malcolm Tredinnick, 15 years ago

Sorry about that. I missed a couple of places in the original search-and-replace and didn't notice a key difference in your traceback. Fixed now.

comment:8 by mch, 15 years ago

Resolution: fixed
Status: closedreopened

I'm seeing this issue with r10925 and Python 2.6.

>>> from django.contrib.gis.utils.geoip import geoip
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/django/contrib/gis/utils/geoip.py", line 45, in <module>
    if not settings._target: settings.configure()
  File "/usr/lib/python2.6/dist-packages/django/utils/functional.py", line 273, in __getattr__
    return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute '_target'

comment:9 by Alex Gaynor, 15 years ago

Resolution: fixed
Status: reopenedclosed

The line: if not settings._target doesn't exist in that revision, you're code somehow wasn't upgraded properly.

comment:10 by Jacob, 12 years ago

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top