Opened 15 years ago

Last modified 15 years ago

#10040 closed

GeoDjango: 'Save As' on spatial record (OSMGeoAdmin) creates broken copy *AND* corrupts the original record — at Initial Version

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

Description

Traceback for original record in Admin after SaveAs failed and created a dud copy:

Environment:

Request Method: GET
Request URL: http://url/admin/geo/borders/136/
Django Version: 1.0.2 final
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',

'django.contrib.contenttypes',
'django.contrib.flatpages',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.gis',
'vovo.geo']

Installed Middleware:
('django.middleware.common.CommonMiddleware',

'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware')

Traceback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in get_response

  1. response = callback(request, *callback_args, callback_kwargs)

File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in root

  1. return self.model_page(request, *url.split('/', 2))

File "/usr/lib/python2.5/site-packages/django/views/decorators/cache.py" in _wrapped_view_func

  1. response = view_func(request, *args, kwargs)

File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in model_page

  1. return admin_obj(request, rest_of_url)

File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in call

  1. return self.change_view(request, unquote(url))

File "/usr/lib/python2.5/site-packages/django/db/transaction.py" in _commit_on_success

  1. res = func(*args, kw)

File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in change_view

  1. form = ModelForm(instance=obj)

File "/usr/lib/python2.5/site-packages/django/forms/models.py" in init

  1. object_data = model_to_dict(instance, opts.fields, opts.exclude)

File "/usr/lib/python2.5/site-packages/django/forms/models.py" in model_to_dict

  1. data[f.name] = f.value_from_object(instance)

File "/usr/lib/python2.5/site-packages/django/db/models/fields/init.py" in value_from_object

  1. return getattr(obj, self.attname)

File "/usr/lib/python2.5/site-packages/django/contrib/gis/db/models/proxy.py" in get

  1. geom = self._klass(geom_value)

File "/usr/lib/python2.5/site-packages/django/contrib/gis/geos/base.py" in init

  1. g = from_hex(geo_input, len(geo_input))

File "/usr/lib/python2.5/site-packages/django/contrib/gis/geos/prototypes/errcheck.py" in check_geom

  1. raise GEOSException('Error encountered checking Geometry returned from GEOS C function "%s".' % func.name)

Exception Type: GEOSException at /admin/geo/borders/136/
Exception Value: Error encountered checking Geometry returned from GEOS C function "GEOSGeomFromHEX_buf".


The copy suffered much the same problem.

If I've not missed anything substantial (which is quite an If, honestly) I'd call something that causes data loss to be Critical.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top