Janis schrieb am Donnerstag, 3. September 2020 um 17:16:50 UTC+2:
Hi all,I recently upgraded django 1.11 to 3.1. Now, in dango 3.1, the following example code from https://docs.djangoproject.com/en/3.1/ref/contrib/gis/geos/#django.contrib.gis.geos.Polygonproduces a Segfault.Code snippet:>>> from django.contrib.gis.geos import Point, LineString, Polygon, LinearRing>>> ext_coords = ((0, 0), (0, 1), (1, 1), (1, 0), (0, 0))
>>> int_coords = ((0.4, 0.4), (0.4, 0.6), (0.6, 0.6), (0.6, 0.4), (0.4, 0.4))
>>> poly = Polygon(ext_coords, int_coords)
>>> [c for c in poly]
[<LinearRing object at 0x7f4796e4f9a0>, <LinearRing object at 0x7f4796e4f2b8>]
>>> [c for c in poly[0]]
Segmentation fault (core dumped)I can also provoke this error with next():>>> from django.contrib.gis.geos import Point, LineString, Polygon, LinearRing
>>> ext_coords = ((0, 0), (0, 1), (1, 1), (1, 0), (0, 0))
>>> int_coords = ((0.4, 0.4), (0.4, 0.6), (0.6, 0.6), (0.6, 0.4), (0.4, 0.4))
>>> poly = Polygon(ext_coords, int_coords)
>>> next(poly[0].__iter__())
Segmentation fault (core dumped)Is this a bug or might there be another reason (e.g. hardware-related issue)?Thanks,Janis
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3f739f4a-84ce-4ed2-a615-70dc5096e498n%40googlegroups.com.
No comments:
Post a Comment