#25657: gevent-monkeypatching with GIS PointField causes intermittent traceback
on
shutdown
----------------------------+--------------------
Reporter: jaddison | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.9b1
Severity: Normal | Keywords: gevent
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------
With the following model and a management command script that creates
several instances of this model - some with `point = None` - I get a
traceback on shutdown of the management command script. Note that the
instances are created/saved to the database perfectly fine. I also am
'''unable to reproduce''' without gevent.
{{{
from django.contrib.gis.db import models
class Provider(models.Model):
point = models.PointField(blank=True, null=True)
}}}
Management script:
{{{
from django.contrib.gis.geos import Point
from django.core.management import BaseCommand
from businesses.models import Provider
class Command(BaseCommand):
def handle(self, *args, **options):
for i in range(100):
Provider.objects.create(
point=Point(-123.329773, 48.407326)
)
Provider.objects.create(
point=None
)
}}}
Finally, the traceback:
{{{
(geos_exception)vagrant@vagrant-ubuntu-trusty-64:/vagrant/geos_exception$
./manage.py testcomm --settings=geos_exception.settings
Exception ignored in: <bound method WKBWriter.__del__ of
<django.contrib.gis.geos.prototypes.io.WKBWriter object at
0x7f7b62d85198>>
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/geos_exception/lib/python3.4/site-
packages/django/contrib/gis/geos/prototypes/io.py", line 137, in __del__
File "/home/vagrant/.virtualenvs/geos_exception/lib/python3.4/site-
packages/django/contrib/gis/geos/libgeos.py", line 157, in __call__
File "/home/vagrant/.virtualenvs/geos_exception/lib/python3.4/site-
packages/django/contrib/gis/geos/prototypes/threadsafe.py", line 52, in
__call__
File "/home/vagrant/.virtualenvs/geos_exception/lib/python3.4/site-
packages/gevent/local.py", line 246, in __getattribute__
TypeError: 'NoneType' object is not callable
}}}
I am attached a tar.gz file containing the test project. Remember, this
issue is intermittent - I can run the management command a time or two
without traceback before seeing the problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/25657>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.65fa3f6c0e80d9609a146971e75cd3e4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.