#25580: GEOSGeometry.srid cannot be set to None
----------------------------+--------------------
     Reporter:  sir-sigurd  |      Owner:  nobody
         Type:  Bug         |     Status:  new
    Component:  GIS         |    Version:  1.8
     Severity:  Normal      |   Keywords:
 Triage Stage:  Unreviewed  |  Has patch:  1
Easy pickings:  0           |      UI/UX:  0
----------------------------+--------------------
 {{{
 In [1]: from django.contrib.gis.geos import Point

 In [2]: p = Point(1, 1)

 In [3]: p.srid is None
 Out[3]: True

 In [4]: p.srid = p.srid
 ---------------------------------------------------------------------------
 ArgumentError                             Traceback (most recent call
 last)
 <ipython-input-4-3612b78cc827> in <module>()
 ----> 1 p.srid = p.srid

 /home/sergey/dev/django/django/contrib/gis/geos/geometry.py in
 set_srid(self, srid)
     367     def set_srid(self, srid):
     368         "Sets the SRID for the geometry."
 --> 369         capi.geos_set_srid(self.ptr, srid)
     370     srid = property(get_srid, set_srid)
     371

 /home/sergey/dev/django/django/contrib/gis/geos/libgeos.pyc in
 __call__(self, *args, **kwargs)
     155         if self.func is None:
     156             self.func = self.get_func(*self.args, **self.kwargs)
 --> 157         return self.func(*args, **kwargs)
     158
     159     def get_func(self, *args, **kwargs):

 /home/sergey/dev/django/django/contrib/gis/geos/prototypes/threadsafe.pyc
 in __call__(self, *args)
      54             # Call the threaded GEOS routine with pointer of the
 context handle
      55             # as the first argument.
 ---> 56             return self.cfunc(self.thread_context.handle.ptr,
 *args)
      57         else:
      58             return self.cfunc(*args)

 ArgumentError: argument 3: <type 'exceptions.TypeError'>: wrong type
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25580>
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/053.5e8e61a466536349adfdfe61ebe76e7e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to