Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#10395 closed (fixed)

GeoIP broken with [9945]

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

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

Attachments (0)

Change History (10)

comment:1 Changed 5 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 5 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

This was fixed in r9953.

comment:3 Changed 5 years ago by anonymous

I'm still getting this error using r9959.

comment:4 Changed 5 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed 5 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from reopened to closed

(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 Changed 5 years ago by mtredinnick

(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 Changed 5 years ago by mtredinnick

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 Changed 5 years ago by mch

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 Changed 5 years ago by Alex

  • Resolution set to fixed
  • Status changed from reopened to closed

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

comment:10 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.