#4663: UnicodeDecodeError with SelectDateWidget
--------------------------------+-------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Status: new | Component: django.newforms
Version: SVN | Resolution:
Keywords: SelectDateWidget | Stage: Unreviewed
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
--------------------------------+-------------------------------------------
Comment (by [EMAIL PROTECTED]):
This error occurs with any locale, except for 'en' (for example: 'ru',
'uk', 'de')
{{{
Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/django/template/__init__.py"
in render_node
738. result = node.render(context)
File "/usr/local/lib/python2.4/site-packages/django/template/__init__.py"
in render
793. return self.encode_output(output)
File "/usr/local/lib/python2.4/site-packages/django/template/__init__.py"
in encode_output
772. return str(output)
File "/usr/local/lib/python2.4/site-packages/django/utils/encoding.py" in
__str__
31. return self.__unicode__().encode(settings.DEFAULT_CHARSET)
File "/usr/local/lib/python2.4/site-packages/django/newforms/forms.py" in
__unicode__
76. return self.as_table()
File "/usr/local/lib/python2.4/site-packages/django/newforms/forms.py" in
as_table
154. return
self._html_output(u'<tr><th>%(label)s</th><td>%(errors)s%(field)s%(help_text)s</td></tr>',
u'<tr><td colspan="2">%s</td></tr>', '</td></tr>', u'<br />%s', False)
File "/usr/local/lib/python2.4/site-packages/django/newforms/forms.py" in
_html_output
139. output.append(normal_row % {'errors': bf_errors, 'label': label,
'field': unicode(bf), 'help_text': help_text})
File "/usr/local/lib/python2.4/site-packages/django/newforms/forms.py" in
__unicode__
238. value = self.as_widget(self.field.widget)
File "/usr/local/lib/python2.4/site-packages/django/newforms/forms.py" in
as_widget
265. return widget.render(self.html_name, data, attrs=attrs)
File "/usr/local/lib/python2.4/site-
packages/django/newforms/extras/widgets.py" in render
43. select_html = Select(choices=month_choices).render(self.month_field
% name, month_val)
File "/usr/local/lib/python2.4/site-packages/django/newforms/widgets.py"
in render
174. output.append(u'<option value="%s"%s>%s</option>' %
(escape(option_value), selected_html,
escape(smart_unicode(option_label))))
UnicodeDecodeError at /accounts/profile/edit/
'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in
range(128)
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/4663#comment:2>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---