Unicode error when adding a subscription at subscriptions administration panel

Reported by David Picó on 2008-04-15
4
Affects Status Importance Assigned to Milestone
Singing & Dancing
Undecided
Daniel Nouri

Bug Description

I try to add a new subscriptor's email at the by-default "Newsletter" subscriptions administration panel and I get an error about Unicode and UTF8. Revision number: 62720.

Here's the log:

Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
  Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render
  Module Products.CacheSetup.patch_utils, line 9, in call_pattern
  Module Products.PageTemplates.PageTemplate, line 89, in pt_render
  Module zope.pagetemplate.pagetemplate, line 117, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 949, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 957, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 957, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 525, in do_optTag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 949, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 949, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 534, in do_optTag_tal
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 745, in do_insertStructure_tal
  Module Products.PageTemplates.Expressions, line 221, in evaluateStructure
  Module zope.tales.tales, line 696, in evaluate
   - URL: controlpanel
   - Line 28, Column 8
   - Expression: <PathExpr standard:'view/contents'>
   - Names:
      {'container': <Channel at /gestaltnet/portal_newsletters/channels/default-channel>,
       'context': <Channel at /gestaltnet/portal_newsletters/channels/default-channel>,
       'default': <object object at 0x39e528>,
       'here': <Channel at /gestaltnet/portal_newsletters/channels/default-channel>,
       'loop': {},
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x83ed5f8>,
       'request': <HTTPRequest, URL=http://frijander.local:8090/gestaltnet/portal_newsletters/channels/default-channel/@@index_html>,
       'root': <Application at >,
       'template': <ImplicitAcquirerWrapper object at 0x80178b0>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <Products.Five.metaclass.SubscriptionsAdministrationView object at 0x8017dd0>,
       'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper object at 0x80171f0>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 161, in _eval
  Module Products.PageTemplates.Expressions, line 123, in render
  Module collective.dancing.browser.channel, line 261, in contents
  Module z3c.form.form, line 189, in __call__
  Module collective.singing.browser.crud, line 296, in update
  Module z3c.form.form, line 186, in update
  Module z3c.form.action, line 99, in execute
  Module z3c.form.button, line 302, in __call__
  Module z3c.form.button, line 170, in __call__
  Module collective.singing.browser.crud, line 268, in handle_add
  Module collective.dancing.browser.channel, line 197, in add
  Module collective.singing.subscribe, line 37, in secret
  Module collective.dancing.composer, line 62, in secret
  Module encodings.utf_8, line 16, in decode
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 2-5: invalid data

Daniel Nouri (daniel.nouri) wrote :

Is the e-mail address that you're trying to add non-ASCII?

  • unnamed Edit (8.3 KiB, text/html; charset=ISO-8859-1)
Download full text (6.3 KiB)

No, it's not. It's <email address hidden>

2008/4/16, Daniel Nouri <email address hidden>:
>
> Is the e-mail address that you're trying to add non-ASCII?
>
>
> --
> Unicode error when adding a subscription at subscriptions administration
> panel
> https://bugs.launchpad.net/bugs/217823
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Singing & Dancing: New
>
> Bug description:
> I try to add a new subscriptor's email at the by-default "Newsletter"
> subscriptions administration panel and I get an error about Unicode and
> UTF8. Revision number: 62720.
>
> Here's the log:
>
> Traceback (innermost last):
> Module ZPublisher.Publish, line 119, in publish
> Module ZPublisher.mapply, line 88, in mapply
> Module ZPublisher.Publish, line 42, in call_object
> Module Shared.DC.Scripts.Bindings, line 313, in __call__
> Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
> Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
> Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render
> Module Products.CacheSetup.patch_utils, line 9, in call_pattern
> Module Products.PageTemplates.PageTemplate, line 89, in pt_render
> Module zope.pagetemplate.pagetemplate, line 117, in pt_render
> Module zope.tal.talinterpreter, line 271, in __call__
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 891, in do_useMacro
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 536, in do_optTag_tal
> Module zope.tal.talinterpreter, line 521, in do_optTag
> Module zope.tal.talinterpreter, line 516, in no_tag
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 891, in do_useMacro
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 536, in do_optTag_tal
> Module zope.tal.talinterpreter, line 521, in do_optTag
> Module zope.tal.talinterpreter, line 516, in no_tag
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 949, in do_defineSlot
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 536, in do_optTag_tal
> Module zope.tal.talinterpreter, line 521, in do_optTag
> Module zope.tal.talinterpreter, line 516, in no_tag
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 957, in do_defineSlot
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 536, in do_optTag_tal
> Module zope.tal.talinterpreter, line 521, in do_optTag
> Module zope.tal.talinterpreter, line 516, in no_tag
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 891, in do_useMacro
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 957, in do_defineSlot
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 536, in do_optTag_tal
> Module zope.tal.talinterpreter, line 521, in do_opt...

Read more...

Daniel Nouri (daniel.nouri) wrote :

In the terminal, when you hit the exception, please go up three times in the stack and paste here what "pp self.request.form" gives you, like this:

(Pdb) up
(Pdb) up
(Pdb) up
(Pdb) pp self.request.form

Thanks!

David Picó (david-pico-vila) wrote :
  • unnamed Edit (9.4 KiB, text/html; charset=ISO-8859-1)
Download full text (7.2 KiB)

There we go:

>
/Applications/Plone-3.0.1/Python-2.4.4/lib/python2.4/encodings/utf_8.py(16)decode()
-> return codecs.utf_8_decode(input, errors, True)
(Pdb) up
>
/Users/david/Webes/webfaction/webfaction2/src/collective.dancing/collective/dancing/composer.py(62)secret()
-> return md5.new(data['email'] + str(salt)).hexdigest()
(Pdb) up
>
/Users/david/Webes/webfaction/webfaction2/src/collective.singing/collective/singing/subscribe.py(37)secret()
-> return cbs.secret(data)
(Pdb) up
>
/Users/david/Webes/webfaction/webfaction2/src/collective.dancing/collective/dancing/browser/channel.py(197)add()
-> secret = collective.singing.subscribe.secret(
(Pdb) pp self.request.form
{'crud-add.buttons.add': u'Add',
 'crud-add.widgets.email':
<email address hidden><u%<email address hidden>>
'}

Is this of any help?
David

2008/4/16, Daniel Nouri <email address hidden>:
>
> In the terminal, when you hit the exception, please go up three times in
> the stack and paste here what "pp self.request.form" gives you, like
> this:
>
> (Pdb) up
> (Pdb) up
> (Pdb) up
> (Pdb) pp self.request.form
>
>
> Thanks!
>
>
> --
> Unicode error when adding a subscription at subscriptions administration
> panel
> https://bugs.launchpad.net/bugs/217823
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Singing & Dancing: New
>
> Bug description:
> I try to add a new subscriptor's email at the by-default "Newsletter"
> subscriptions administration panel and I get an error about Unicode and
> UTF8. Revision number: 62720.
>
> Here's the log:
>
> Traceback (innermost last):
> Module ZPublisher.Publish, line 119, in publish
> Module ZPublisher.mapply, line 88, in mapply
> Module ZPublisher.Publish, line 42, in call_object
> Module Shared.DC.Scripts.Bindings, line 313, in __call__
> Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
> Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
> Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render
> Module Products.CacheSetup.patch_utils, line 9, in call_pattern
> Module Products.PageTemplates.PageTemplate, line 89, in pt_render
> Module zope.pagetemplate.pagetemplate, line 117, in pt_render
> Module zope.tal.talinterpreter, line 271, in __call__
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 891, in do_useMacro
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 536, in do_optTag_tal
> Module zope.tal.talinterpreter, line 521, in do_optTag
> Module zope.tal.talinterpreter, line 516, in no_tag
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 891, in do_useMacro
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 536, in do_optTag_tal
> Module zope.tal.talinterpreter, line 521, in do_optTag
> Module zope.tal.talinterpreter, line 516, in no_tag
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 949, in do_defineSlot
> Module zope.tal.talinterpreter, line 346, in interpret
> ...

Read more...

Daniel Nouri (daniel.nouri) wrote :

Thanks. I fixed this in r62841. You'll need to reinstall Singing & Dancing after removing the 'portal_newsletters' utility. Or make a new site.

Changed in singing-dancing:
assignee: nobody → daniel.nouri
status: New → Fix Committed
David Picó (david-pico-vila) wrote :
  • unnamed Edit (8.7 KiB, text/html; charset=ISO-8859-1)
Download full text (6.6 KiB)

OK. I had reinstalled it, but I didn't know I had to remove the
portal_newsletters utility.
Regards,
David

2008/4/17, Daniel Nouri <email address hidden>:
>
> Thanks. I fixed this in r62841. You'll need to reinstall Singing &
> Dancing after removing the 'portal_newsletters' utility. Or make a new
> site.
>
> ** Changed in: singing-dancing
> Assignee: (unassigned) => Daniel Nouri (daniel.nouri)
> Status: New => Fix Committed
>
>
> --
> Unicode error when adding a subscription at subscriptions administration
> panel
> https://bugs.launchpad.net/bugs/217823
> You received this bug notification because you are a direct subscriber
> of the bug.
>
>
> Status in Singing & Dancing: Fix Committed
>
>
> Bug description:
> I try to add a new subscriptor's email at the by-default "Newsletter"
> subscriptions administration panel and I get an error about Unicode and
> UTF8. Revision number: 62720.
>
> Here's the log:
>
> Traceback (innermost last):
> Module ZPublisher.Publish, line 119, in publish
> Module ZPublisher.mapply, line 88, in mapply
> Module ZPublisher.Publish, line 42, in call_object
> Module Shared.DC.Scripts.Bindings, line 313, in __call__
> Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
> Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
> Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render
> Module Products.CacheSetup.patch_utils, line 9, in call_pattern
> Module Products.PageTemplates.PageTemplate, line 89, in pt_render
> Module zope.pagetemplate.pagetemplate, line 117, in pt_render
> Module zope.tal.talinterpreter, line 271, in __call__
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 891, in do_useMacro
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 536, in do_optTag_tal
> Module zope.tal.talinterpreter, line 521, in do_optTag
> Module zope.tal.talinterpreter, line 516, in no_tag
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 891, in do_useMacro
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 536, in do_optTag_tal
> Module zope.tal.talinterpreter, line 521, in do_optTag
> Module zope.tal.talinterpreter, line 516, in no_tag
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 949, in do_defineSlot
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 536, in do_optTag_tal
> Module zope.tal.talinterpreter, line 521, in do_optTag
> Module zope.tal.talinterpreter, line 516, in no_tag
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 957, in do_defineSlot
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 536, in do_optTag_tal
> Module zope.tal.talinterpreter, line 521, in do_optTag
> Module zope.tal.talinterpreter, line 516, in no_tag
> Module zope.tal.talinterpreter, line 346, in interpret
> Module zope.tal.talinterpreter, line 891, in do_useMac...

Read more...

Changed in singing-dancing:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers