Modify ↓
Opened 17 years ago
Closed 17 years ago
#4163 closed defect (fixed)
Error sending e-mails when field value is "None"
| Reported by: | Andrew Van Pernis | Owned by: | Steve Romanow |
|---|---|---|---|
| Priority: | normal | Component: | AnnouncerPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.11 |
Description
I've been running the Slestak branch with Trac 11.2.1
System Information Trac: 0.11.2.1 Python: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] setuptools: 0.7a1 SQLite: 3.3.4 pysqlite: 2.3.2 Genshi: 0.5 mod_python: 3.3.1 Pygments: 0.10 Subversion: 1.5.1 (r32289) jQuery: 1.2.6
Many e-mails were not being sent so checking the log I noticed the following error.
2008-11-25 10:29:39,342 Trac[api] ERROR: AnnouncementSystem failed.
Traceback (most recent call last):
File "build\bdist.win32\egg\announcerplugin\api.py", line 377, in _real_send
distributor.distribute(transport, packages[transport], evt)
File "build\bdist.win32\egg\announcerplugin\distributors\email_distributor.py", line 195, in distribute
self._do_send(transport, event, format, messages[format], formats[format], None, to, public_cc)
File "build\bdist.win32\egg\announcerplugin\distributors\email_distributor.py", line 224, in _do_send
output = formatter.format(transport, event.realm, format, event)
File "build\bdist.win32\egg\announcerplugin\formatters\ticket_email.py", line 88, in format
return self._format_html(event)
File "build\bdist.win32\egg\announcerplugin\formatters\ticket_email.py", line 154, in _format_html
if ('\n' in new_value) or ('\n' in old_value):
TypeError: argument of type 'NoneType' is not iterable
Attachments (1)
Change History (4)
Changed 17 years ago by
| Attachment: | ticket_email.py.diff added |
|---|
comment:1 Changed 17 years ago by
| Trac Release: | 0.10 → 0.11 |
|---|
I've added a patch that worked for me. I'm not a python expert, so I did the simple solution of converting everything to strings.
comment:2 Changed 17 years ago by
| Owner: | changed from Robert Corsaro to Steve Romanow |
|---|
I've noticed casting with str() doesn't work for non-ascii characters. Perhaps casting with unicode() is a better idea.
Note: See
TracTickets for help on using
tickets.



Patch to resolve #4163