Ticket #966 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

'ascii' codec can't decode byte 0xe9 in position 15: ordinal not in range(128)

Reported by: avoinea Owned by: lregebro
Priority: P1 Milestone: CPS 3.3.7
Component: CPSDefault Version: 3.3.6
Severity: normal Keywords:
Cc:

Description (last modified by fguillaume) (diff)

This error is raised only when portal language is French, there is no "Favorites" folder in your member area and you try to add a bookmark to current page by pressing "Ajouter aux favoris".

    * Module ZPublisher.Publish, line 119, in publish
    * Module Zope2.App.startup, line 215, in commit
    * Module transaction._manager, line 84, in commit
    * Module transaction._transaction, line 373, in commit
    * Module transaction._transaction, line 413, in _callBeforeCommitHooks
    * Module Products.CPSCore.TransactionManager, line 139, in __call__
    * Module Products.CPSSubscriptions.EventManager, line 135, in __call__
    * Module Products.CPSSubscriptions.SubscriptionsTool, line 769, in notify_processed_event
    * Module Products.CPSSubscriptions.Subscription, line 196, in sendEvent
    * Module Products.CPSSubscriptions.Notifications, line 420, in notifyRecipients
    * Module Products.CPSSubscriptions.Notifications, line 238, in _getSubject

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 15: ordinal not in range(128)

Change History

comment:1 Changed 14 years ago by fguillaume

  • Description modified (diff)
  • Milestone changed from CPS 3.3.6 to CPS 3.4.0

comment:2 Changed 14 years ago by lregebro

  • Owner changed from trac to lregebro
  • Status changed from new to assigned

This is because the title of the favourites folder gets translated, and hence is stored as unicode. The notification then tries to use that when creating the notification message, forcing an implicit conversion into unicode of the whole notification message. This works fine in english, but not in in French, as the notification title is 'Cr\xe9ation de contenu'.

This can be solved either by forcing the title of the favorites folder to not be unicode, or by making sure when making the notifications that everything is either unicode, or not unicode.

(Or it can be bypassed by setting the Zope instances default encoding).

comment:3 Changed 14 years ago by fguillaume

CPS 3.3.* should *never* store unicode in standard document fields like title or description.

comment:4 Changed 14 years ago by lregebro

Fixed (for new favorites folders) in revision [28649].

comment:5 Changed 14 years ago by lregebro

  • Status changed from assigned to closed
  • Component changed from CPSSubscriptions to CPSDefault
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.