#6799 closed defect (fixed)
Change announcement fails for wiki pages with non-ascii names
Reported by: | Owned by: | Steffen Hoffmann | |
---|---|---|---|
Priority: | high | Component: | AnnouncerPlugin |
Severity: | major | Keywords: | unicode 0.12 |
Cc: | Steffen Hoffmann | Trac Release: | 0.12 |
Description
AnnouncerPlugin (latest trunk 7719) fails while sending e-mail notification when the Wiki name is non-Ascii:
2010-03-12 20:42:02,560 Trac[api] ERROR: AnnouncementSystem failed. Traceback (most recent call last): File "build/bdist.linux-i686/egg/announcer/api.py", line 382, in _real_send distributor.distribute(transport, packages[transport], evt) File "build/bdist.linux-i686/egg/announcer/distributors/mail.py", line 256, in distribute self._do_send(transport, event, k, v, fmtdict[k]) File "build/bdist.linux-i686/egg/announcer/distributors/mail.py", line 380, in _do_send decorator.decorate_message(event, rootMessage, decorators) File "build/bdist.linux-i686/egg/announcer/email_decorators/wiki.py", line 67, in decorate_message return next_decorator(event, message, decorates) File "build/bdist.linux-i686/egg/announcer/util/mail.py", line 46, in next_decorator return next.decorate_message(event, message, decorates) File "build/bdist.linux-i686/egg/announcer/email_decorators/ticket.py", line 83, in decorate_message return next_decorator(event, message, decorates) File "build/bdist.linux-i686/egg/announcer/util/mail.py", line 46, in next_decorator return next.decorate_message(event, message, decorates) File "build/bdist.linux-i686/egg/announcer/email_decorators/ticket.py", line 71, in decorate_message return next_decorator(event, message, decorates) File "build/bdist.linux-i686/egg/announcer/util/mail.py", line 46, in next_decorator return next.decorate_message(event, message, decorates) File "build/bdist.linux-i686/egg/announcer/email_decorators/generic.py", line 137, in decorate_message return next_decorator(event, message, decorators) File "build/bdist.linux-i686/egg/announcer/util/mail.py", line 46, in next_decorator return next.decorate_message(event, message, decorates) File "build/bdist.linux-i686/egg/announcer/email_decorators/generic.py", line 116, in decorate_message return next_decorator(event, message, decorates) File "build/bdist.linux-i686/egg/announcer/util/mail.py", line 46, in next_decorator return next.decorate_message(event, message, decorates) File "build/bdist.linux-i686/egg/announcer/email_decorators/generic.py", line 64, in decorate_message uid = uid_encode(self.env.abs_href(), event.realm, event.target) File "build/bdist.linux-i686/egg/announcer/util/mail.py", line 73, in uid_encode return b32encode(uid) File "/usr/lib/python2.5/base64.py", line 152, in b32encode c1, c2, c3 = struct.unpack('!HHB', s[i*5:(i+1)*5]) File "/usr/lib/python2.5/struct.py", line 87, in unpack return o.unpack(s) error: unpack requires a string argument of length 5
Attachments (4)
Change History (19)
comment:1 Changed 14 years ago by
Cc: | Steffen Hoffmann added; anonymous removed |
---|---|
Keywords: | unicode 0.12 added |
Summary: | Does not work for wiki pages with non-Ascii names → Change announcement fails for wiki pages with non-Ascii names |
comment:2 Changed 14 years ago by
Sorry, I can't check this with 0.12 because my installation of trac is bleeding-edge. I'll attach my configuration file and the latest and full log. The wiki page name is "ТестоваяСтраница".
About Trac
System Information
Trac | 0.13dev-r9983 |
Trac | 0.13dev-r9983 |
Babel | 1.0dev-r488 |
Docutils | 0.5 |
Genshi | 0.6 |
mod_python | 3.3.1 |
Pygments | 1.2.2 |
pysqlite | 2.4.1 |
Python | 2.5.2 (r252:60911, Jan 24 2010, 15:24:24) [GCC 4.3.2] |
Python | 2.5.2 (r252:60911, Jan 24 2010, 15:24:24) [GCC 4.3.2] |
pytz | 2008c |
pytz | 2008c |
setuptools | 0.6c11 |
setuptools | 0.6c11 |
SQLite | 3.5.9 |
Subversion | 1.5.1 (r32289) |
jQuery: | 1.4.2 |
Installed Plugins
AnnouncerPlugin | 0.12-p2.dev | /usr/lib/python2.5/site-packages/AnnouncerPlugin-0.12_p2.dev-py2.5.egg |
TracFlashEmbedMacro | N/A | /usr/share/trac/projects/os/trac/plugins/TracFlashEmbedMacro.pyc |
UserStats | Rev | /usr/share/trac/projects/os/trac/plugins/UserStats.pyc |
Changed 14 years ago by
log trac 0.13dev-r9983 and AnnouncerPlugin r8340
comment:3 Changed 14 years ago by
Sorry, AnnouncerPlugin revision is r8336: Path: announcer URL: http://trac-hacks.org/svn/announcerplugin/trunk Repository Root: http://trac-hacks.org/svn Repository UUID: 7322e99d-02ea-0310-aa39-e9a107903beb Revision: 8340 Node Kind: directory Schedule: normal Last Changed Author: hasienda Last Changed Rev: 8336 Last Changed Date: 2010-08-05 16:05:49 +0400
comment:4 Changed 14 years ago by
Owner: | changed from Robert Corsaro to Steffen Hoffmann |
---|---|
Status: | new → assigned |
Summary: | Change announcement fails for wiki pages with non-Ascii names → Change announcement fails for wiki pages with non-ascii names |
ТестоваяСтраница - nice (I remember a little from the 5 years of Russian lessons at school.) Thanks for the requested information. Now there is definitely something to start working on.
I'll try to find a solution. I suspect it might be related to (missing) unicode string encoding, and if so, this could be fixed easily. I hope so, let's do some debugging here and see.
comment:6 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:7 Changed 14 years ago by
svn info Path: . URL: http://trac-hacks.org/svn/announcerplugin/trunk Repository Root: http://trac-hacks.org/svn Repository UUID: 7322e99d-02ea-0310-aa39-e9a107903beb Revision: 8968 Node Kind: directory Schedule: normal Last Changed Author: doki_pen Last Changed Rev: 8960 Last Changed Date: 2010-09-18 21:24:17 +0400 (Сбт, 18 Сен 2010)
Trac 0.13dev-r10103
TracAnnouncer 0.12.1.dev /usr/lib/python2.5/site-packages/TracAnnouncer-0.12.1.dev-py2.5.egg
Please tell me, is it just me or something is wrong? I'll attach a log.
Changed 14 years ago by
Attachment: | trac.2.log added |
---|
comment:8 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Ah. for me exception is gone, and email is sent, but title is blank. I'll look at it more. It's better ;)
Changed 14 years ago by
Attachment: | trac.3.log added |
---|
comment:11 Changed 14 years ago by
I can see the issue now. I add a reversible message id to the email so that trac can handle responses to emails. (this requires other tools as well, if interested, check out tracgate at http://github.com/dokipen). The trick to this message id is that, on a response email, I must be able to decode it to an actual resource so the response email can perform some action on the resource. This is only used for realms specified in
[announcer] email_threaded_realms = wiki, ticket
As a workaround, you can change this to tickets. For tickets, the ticket id is used so you wont see this issue. Unfortunately, wiki name is the id for wiki pages. I'll get this fixed though.
comment:12 Changed 14 years ago by
So this is workaround:
[announcer] email_threaded_realms = ticket
comment:13 Changed 14 years ago by
Our group don't really need "reply" feature, so this workaround fits us. I have changed my config and it works with non-ascii-named wiki pages. I can't even test tracgate feature at this time, so I don't know how can I help you to test further fixes for this ticket.
comment:14 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Thank you, r8976 solved this issue!
comment:15 Changed 14 years ago by
I should also mention that using the work around would stop your email client from being able to thread announcements about the same wiki page. I had forgotten this detail. But the workaround shouldn't be needed anymore.
Since 0.12 wasn't out at the time of your report, could you confirm that this still applies to Trac 0.12, please?
May I further ask for some more details about your test environment? With "Wiki name" you refer to the wiki page name, and you certainly expected a page content change announcement to happen here, right? It could help to tell us the relevant page name etc. as well. Thanks in advance.