On Tue, May 30, 2017 at 5:58 PM, Jun Omae <[email protected]> wrote:
>> "Warning: The change has been saved, but an error occurred while
>> sending notifications: You must not use 8-bit bytestrings unless you
>> use a text_factory that can interpret 8-bit bytestrings (like
>> text_factory = str). It is highly recommended that you instead just
>> switch your application to Unicode strings. "
>
> That message is raised from SQLite bindings.
>
>>  OnSiteNotifications 1.0
>
> I guess this plugin uses utf-8 bytestring to create record when
> sending notification.
>
> diff --git a/onsitenotificationsplugin/trunk/onsitenotifications/web_ui.py
> b/onsitenotificationsplugin/trunk/onsitenotifications/web
> index 3499c4dd8..59fdb3432 100644
> --- a/onsitenotificationsplugin/trunk/onsitenotifications/web_ui.py
> +++ b/onsitenotificationsplugin/trunk/onsitenotifications/web_ui.py
> @@ -12,6 +12,7 @@ from trac.resource import Resource,
> get_resource_description, get_resource_url
>  from trac.web.api import IRequestHandler
>  from trac.web.chrome import add_ctxtnav, INavigationContributor
>  from trac.util.compat import set
> +from trac.util.text import to_unicode
>
>  from onsitenotifications.model import OnSiteMessage
>
> @@ -72,6 +73,7 @@ class OnSiteNotificationsDistributor(Component):
>
>          for fmt, sids in msgdict.iteritems():
>              message = formats[fmt].format(transport, fmt, event)
> +            message = to_unicode(message)
>              for sid, authenticated in sids:
>                  OnSiteMessage.add(self.env, sid, authenticated, message,
>                                    event.realm, get_target_id(event.target))

I can try disabling that to see what happens. I would have thought all
was utf-8 in my browser. Maybe some browser setting has changed.


-- 
Roger Oberholtzer

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to