Skip to content

Unicode decoding error during rendering a date field #8

Description

@aodag

I use fa.jquery-0.9.4

RenderError: An uncaught exception was raised. TypeError: decoding Unicode is not supported - Expression: "field.render()" - Filename: C:\Users\aodag\Documents\works\olive\lib\site-packages\fa.jquery-0.9.4-py2.7.egg\fa\jquery\templates\forms\fieldset.pt - Location: (21:32) - Arguments: repeat: {...} (1) renderer_name: pyramid_formalchemy:templates/forms/fieldset.pt template: <PageTemplateFile - at 0x3f11be0L> F_: <instancemethod translate at 0x41a8360L> renderer_info: <RendererHelper - at 0x642db00L> focus_rendered: True attrs: {...} (1) nothing: <NoneType - at 0x1e291448L> fieldset: <FieldSet - at 0x643ec50L> convert: <function translate at 0x403bac8L> fatypes: <module formalchemy.fatypes at 0x3e1c498L> field: <AttributeField - at 0x627c240L> default: <Placeholder - at 0x4196898L> error: <list - at 0x6470888L> request: <Request - at 0x643e320L> decode: <type unicode at 0x1e2a4150L> macros: <Macros - at 0x6265228L> html: <module formalchemy.helpers at 0x3d275b8L> context: <NoneType - at 0x1e291448L> translate: <function translate at 0x403bac8L> view: <NoneType - at 0x1e291448L>

<< value = self.field.model_value
F_ = self.get_translator(**kwargs)
month_options = [(F_('Month'), 'MM')] + [(unicode(F_('month_%02i' % i), 'utf-8'), str(i)) for i in xrange(1, 13)]
day_options = [(F_('Day'), 'DD')] + [(i, str(i)) for i in xrange(1, 32)]
mm_name = self.name + '__month'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions