Mysterious message has started

瀏覽次數:16 次
跳到第一則未讀訊息

Roger Oberholtzer

未讀,
2017年5月29日 上午8:19:092017/5/29
收件者:trac-...@googlegroups.com
I now see the following in my browser and Trac log file:

"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. "

It happens when I add a comment to a ticket.

I cannot think that anything has been updated from then this started.
This is in Firefox 53.0.3

I would have thought that Firefox had always been using Unicode
strings. Or could this be a Trac setting?


--
Roger Oberholtzer

Jun Omae

未讀,
2017年5月29日 上午8:30:382017/5/29
收件者:trac-...@googlegroups.com
On Mon, May 29, 2017 at 9:19 PM, Roger Oberholtzer
<roger.ob...@gmail.com> 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. "

Could you please provide system information, enabled plugins, trac.log
and trac.ini?

--
Jun Omae <jun...@gmail.com> (大前 潤)

Roger Oberholtzer

未讀,
2017年5月29日 上午8:59:252017/5/29
收件者:trac-...@googlegroups.com
User Agent: Mozilla/5.0 (X11; Linux i686; rv:53.0) Gecko/20100101 Firefox/53.0

Trac is running on openSUSE Tumbleweed (64-bit). Nothing in Trac was
updated or modified when the messages started. The only message in the
Trac log is the one I reported. Otherwise Trac seems happy.

PackageVersion

Trac 1.2.1
Babel 2.4.0
Docutils 0.13.1
Genshi 0.7 (with speedups)
HTMLDOC Executable not found or unexpected error
mod_python 3.5.0-none=none
Pygments 2.2.0
pysqlite 2.8.1
Python 2.7.13 (default, Jan 03 2017, 17:41:54) [GCC]
pytz 2017.2
RPC 1.1.7.dev0
setuptools 34.2.0
SQLite 3.18.0
Subversion 1.9.5 (r1770682)
Textile 2.3.3
jQuery1.11.3
jQuery UI1.11.4
jQuery Timepicker1.5.5

Installed Plugins

AllAttachmentsMacro 0.1
ASCIIMath 1.0-r15929
Cards 1.3
CodeExampleMacro 1.2.post0
ComponentHierarchy 1.2.0.dev0
CSV 1.0-r15929
EstimationTools 0.5.0.dev0
ExcelDownloadPlugin 0.12.0.6
FoldMacro N/A
FootNoteMacro 1.5
graphviz 0.7.7dev-r0
HudsonTrac 0.5.post0
Latex 0.1.post0
MilestoneQuery 1.0.2
NoteBox 1.0.post0
OnSiteNotifications 1.0
PlannedMilestones N/A
SqlAlchemyQuery 0.1
ticketsboardplugin 1.2.3-trac0.12dev
timingandestimationplugin 1.4.8
TracAddCommentMacro 0.3
TracBackLinkPlugin 1.0.5
TracBookmark 1.0.0.dev0
Tracchildtickets 2.5.5.dev0
TracCiteCode 0.3.0
TracCollapsiblePlugin 0.1
TracDiscussion 1.2.dev0
TracDownloads 1.0.0.dev0
TracDragDrop 0.12.0.13
TracDynamicFields 2.2.0
TracHtmlNotificationPlugin 0.12.0.1
TracIncludeMacro 3.0.0.dev0
TracJenkinsPlugin 1.0
TracMacroPost 0.2
TracMasterTickets 4.0.1.dev0
TracQuiet 1.2.0.dev0
TracReportInplaceEditPlugin 0.2
TracSectionEditPlugin 0.2.6.post0
TracStats 0.6.1
TracSumFields 2.0.0.dev0
TracTags 0.10.dev0
TracTicketTemplate 1.0.dev0
TracWikiToPdfPlugin 3.0.0.dev0
TracWorkflowAdmin 0.12.0.3
TracWysiwyg 0.12.0.5
TracXMLRPC 1.1.7.dev0
upcomingmilestoneschartmacro N/A
WeekPlan 1.3
WikiAutoComplete 1.2
> --
> 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 trac-users+...@googlegroups.com.
> To post to this group, send email to trac-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/trac-users.
> For more options, visit https://groups.google.com/d/optout.



--
Roger Oberholtzer

RjOllos

未讀,
2017年5月29日 下午4:11:172017/5/29
收件者:Trac Users


On Monday, May 29, 2017 at 5:59:25 AM UTC-7, Roger Oberholtzer wrote:
User Agent: Mozilla/5.0 (X11; Linux i686; rv:53.0) Gecko/20100101 Firefox/53.0

Trac is running on openSUSE Tumbleweed (64-bit). Nothing in Trac was
updated or modified when the messages started. The only message in the
Trac log is the one I reported. Otherwise Trac seems happy.

Please share your [notification] section from trac.ini.

- Ryan
 

Roger Oberholtzer

未讀,
2017年5月30日 凌晨1:20:562017/5/30
收件者:trac-...@googlegroups.com
[notification]
admit_domains =
always_notify_owner = true
always_notify_reporter = true
always_notify_updater = true
email_sender = SmtpEmailSender
ignore_domains =
mime_encoding = base64
smtp_default_domain =
smtp_enabled = enabled
smtp_from = tr...@systems.rst.ramboll.se
smtp_from_author = disabled
smtp_from_name = Do Not Reply
smtp_replyto = trac@localhost
smtp_server = 10.2.5.113
ticket_subject_template = $prefix #$ticket.id: $summary
use_public_cc = enabled
use_short_addr = disabled
use_tls = disabled

Some day I need to improve this section to get more notifications
working. But this is what it has been for eons.

Jun Omae

未讀,
2017年5月30日 上午11:58:532017/5/30
收件者:trac-...@googlegroups.com
> "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))

Roger Oberholtzer

未讀,
2017年5月30日 下午1:44:242017/5/30
收件者:trac-...@googlegroups.com
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
回覆所有人
回覆作者
轉寄
0 則新訊息