Opened 17 years ago
Closed 17 years ago
#6357 closed (fixed)
'unicode' object has no attribute 'wkt'
Reported by: | Owned by: | jbronn | |
---|---|---|---|
Component: | GIS | Version: | gis |
Severity: | Keywords: | gis admin wkt | |
Cc: | jbronn@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Using the GIS branch...
When you save an object in the admin that is spatially enabled the error "'unicode' object has no attribute 'wkt'" is thrown when there is a field validation error on another field. For example, if you have a URLField and a MultipolygonField on a model and try to save an object with an invalid URL in the URLField you'll get the error. Here are the details:
Template error:
In template /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/admin/templates/widget/default.html, error at line 1
Caught an exception while rendering: 'unicode' object has no attribute 'wkt'
1 : {% load admin_modify %} {% output_all bound_field.form_fields %}
2 :
Traceback:
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/template/debug.py" in render_node
- result = node.render(context)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/template/init.py" in render
- return func(*resolved_vars)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/admin/templatetags/admin_modify.py" in output_all
- return u.join([force_unicode(f) for f in form_fields])
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/utils/encoding.py" in force_unicode
- s = unicode(s)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/oldforms/init.py" in unicode
- return force_unicode(self.formfield.render(self.data))
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/gis/oldforms/init.py" in render
- return super(WKTField, self).render(data.wkt)
Exception Type: AttributeError at /admin/schools/school/1257/
Exception Value: 'unicode' object has no attribute 'wkt'
Change History (3)
comment:1 by , 17 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Version: | SVN → gis |
comment:2 by , 17 years ago
Cc: | added |
---|---|
Keywords: | gis admin wkt added |
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The traceback suggests this is a bug. Thanks!