{{{
Exception TypeError: "'NoneType' object is not callable" in <bound method
_WKBReader.__del__ of <django.contrib.gis.geos.prototypes.io._WKBReader
object at 0x10704ea50>> ignored
Exception TypeError: "'NoneType' object is not callable" in <bound method
WKBWriter.__del__ of <django.contrib.gis.geos.prototypes.io.WKBWriter
object at 0x10705a290>> ignored
}}}
I experienced that on Python 2.7.4, Django 1.5.1 with Gdal 1.10, Geos
3.3.5, Postgres 9.2.4 and PostGIS 2.0.1 on MacOSX 10.8. And I do not have
module-level globals.
The funny thing is that the warnings disappeared after some work, I tried
to recreate the original conditions (prints, errors, etc..) but I do not
manage to reproduce these errors I had 2 times in a row when quitting the
runserver... In any case, seems very minor... Maybe some other may confirm
the same behaviour.
--
Ticket URL: <https://code.djangoproject.com/ticket/20903>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* resolution: => worksforme
* needs_tests: => 0
* needs_docs: => 0
Comment:
I'm afraid it will be difficult to fix if we cannot come with a
reproducible test case. If anyone can provide a failing test, please
reopen the ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/20903#comment:1>
* keywords: => geos, postgres, geodjango
* status: closed => new
* version: 1.5 => 1.6
* resolution: worksforme =>
* type: Uncategorized => Bug
Comment:
I'm receiving the same error with Python 2.7.7, Django 1.6.5, Geos 3.3.8,
Postgres 9.3.1.0 (18) - using http://postgresapp.com/ and Mac OSX 10.8.5.
It occurs every time I run a test, shell or a management command which
accesses a database object which contains a {{{ gis_models.PointField }}}
For example:
{{{
Python 2.7.7 (default, Jun 2 2014, 18:53:46)
Type "copyright", "credits" or "license" for more information.
IPython 1.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
/Users/matt/Code/envs/hpflsk3/lib/python2.7/site-
packages/IPython/terminal/interactiveshell.py:432: DeprecationWarning:
With-statements now directly support multiple context managers
with nested(self.builtin_trap, self.display_trap):
In [1]: from myapp.models import Location
In [2]: l = Location()
In [3]: l.name = "blah"
In [4]: l.latitude = 1.23
In [5]: l.longitude = 4.56
In [6]: l.save()
In [7]:
Do you really want to exit ([y]/n)? y
Exception TypeError: "'NoneType' object is not callable" in <bound method
_WKTReader.__del__ of <django.contrib.gis.geos.prototypes.io._WKTReader
object at 0x105565a50>> ignored
Exception TypeError: "'NoneType' object is not callable" in <bound method
WKBWriter.__del__ of <django.contrib.gis.geos.prototypes.io.WKBWriter
object at 0x1055af210>> ignored
}}}
Where models.py is
{{{
class Location(BaseModel):
name = models.CharField(max_length=255)
point = gis_models.PointField(default="POINT(0.0 0.0)")
@property
def latitude(self):
return self.point.y
@latitude.setter
def latitude(self, value):
self.point.y = value
@property
def longitude(self):
return self.point.x
@longitude.setter
def longitude(self, value):
self.point.x = value
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20903#comment:2>
Comment (by claudep):
Could you maybe provide BaseModel also, or even better a complete sample
project?
--
Ticket URL: <https://code.djangoproject.com/ticket/20903#comment:3>
* status: new => closed
* resolution: => needsinfo
--
Ticket URL: <https://code.djangoproject.com/ticket/20903#comment:4>