Opened 9 years ago

Last modified 6 years ago

#266 closed defect

'NoneType' object has no attribute 'replace' — at Version 5

Reported by: noc@… Owned by: bas
Priority: major Milestone:
Component: email2trac Version: 2.1.0
Keywords: notify exception Cc:

Description (last modified by bas)

$Id: email2trac.py.in 521 2011-06-06 08:56:45Z bas $

Ticket created but notification does not send (email2trac ends with error). Exception on call tn.notify(tkt, new, modtime) of def notify(self, tkt, new=True, modtime=0)

What's wrong? Searched google but no one useful advice found.

sh # email2trac -d --project=project < msg.txt
msg.txt:
2011-08-16 14:37:39,692 email2trac project: Found trac version: 0.12
2011-08-16 14:37:39,928 email2trac project: Loading environment /some/where/project
2011-08-16 14:37:40,223 email2trac project: Main function parse
2011-08-16 14:37:40,232 email2trac project: function get_message_parts()
2011-08-16 14:37:40,233 email2trac project:      Message part: Main-Type: multipart
2011-08-16 14:37:40,233 email2trac project:      Message part: Content-Type: multipart/mixed
2011-08-16 14:37:40,233 email2trac project:      Skipping multipart container
2011-08-16 14:37:40,233 email2trac project:      Message part: Main-Type: text
2011-08-16 14:37:40,234 email2trac project:      Message part: Content-Type: text/plain
2011-08-16 14:37:40,234 email2trac project: function inline_part()
2011-08-16 14:37:40,235 email2trac project:      Message part: Main-Type: text
2011-08-16 14:37:40,235 email2trac project:      Message part: Content-Type: text/plain
2011-08-16 14:37:40,235 email2trac project: function inline_part()
2011-08-16 14:37:40,237 email2trac project: function unique_attachment_names()
2011-08-16 14:37:40,237 email2trac project: function get_body_text()
2011-08-16 14:37:40,238 email2trac project: function debug_attachments
2011-08-16 14:37:40,255 email2trac project: function email_to_unicode
2011-08-16 14:37:40,256 email2trac project: function email_to_unicode
2011-08-16 14:37:40,260 email2trac project: function email_header_acl: white_list
2011-08-16 14:37:40,260 email2trac project: white_list not defined, all messages are allowed.
2011-08-16 14:37:40,260 email2trac project: function email_header_acl: black_list
2011-08-16 14:37:40,261 email2trac project: function email_header_acl: recipient_list
2011-08-16 14:37:40,261 email2trac project: recipient_list not defined, all messages are allowed.
2011-08-16 14:37:40,262 email2trac project: function email_to_unicode
2011-08-16 14:37:40,262 email2trac project: subject: Test1234567890
2011-08-16 14:37:40,264 email2trac project: function ticket_update_by_subject
2011-08-16 14:37:40,264 email2trac project: function new_ticket
2011-08-16 14:37:40,279 email2trac project: function set_reply_fields
2011-08-16 14:37:40,279 email2trac project: function set_ticket_fields
2011-08-16 14:37:40,279 email2trac project: trac[summary] =
2011-08-16 14:37:40,280 email2trac project: trac[reporter] =
2011-08-16 14:37:40,280 email2trac project: trac[owner] =
2011-08-16 14:37:40,280 email2trac project: trac[description] =
2011-08-16 14:37:40,281 email2trac project: trac[type] = defect
2011-08-16 14:37:40,281 email2trac project: used type = defect
2011-08-16 14:37:40,281 email2trac project: trac[status] =
2011-08-16 14:37:40,281 email2trac project: trac[priority] = major
2011-08-16 14:37:40,282 email2trac project: used priority = major
2011-08-16 14:37:40,282 email2trac project: trac[milestone] =
2011-08-16 14:37:40,282 email2trac project: trac[component] =
2011-08-16 14:37:40,282 email2trac project: trac[resolution] = None
2011-08-16 14:37:40,283 email2trac project: trac[keywords] =
2011-08-16 14:37:40,283 email2trac project: trac[cc] = 
2011-08-16 14:37:40,283 email2trac project: used cc = 
2011-08-16 14:37:40,283 email2trac project: trac[time] =
2011-08-16 14:37:40,284 email2trac project: trac[changetime] =
2011-08-16 14:37:40,284 email2trac project: function update_ticket_fields
2011-08-16 14:37:40,284 email2trac project: user_field   priority = major
2011-08-16 14:37:40,284 email2trac project: ticket_field         priority = major
2011-08-16 14:37:40,285 email2trac project: user_field   cc = 
2011-08-16 14:37:40,285 email2trac project: ticket_field         cc = 
2011-08-16 14:37:40,285 email2trac project: user_field   type = defect
2011-08-16 14:37:40,285 email2trac project: ticket_field         type = defect
2011-08-16 14:37:40,286 email2trac project: function get_message_parts()
2011-08-16 14:37:40,286 email2trac project:      Message part: Main-Type: multipart
2011-08-16 14:37:40,286 email2trac project:      Message part: Content-Type: multipart/mixed
2011-08-16 14:37:40,286 email2trac project:      Skipping multipart container
2011-08-16 14:37:40,287 email2trac project:      Message part: Main-Type: text
2011-08-16 14:37:40,287 email2trac project:      Message part: Content-Type: text/plain
2011-08-16 14:37:40,287 email2trac project: function inline_part()
2011-08-16 14:37:40,288 email2trac project:      Message part: Main-Type: text
2011-08-16 14:37:40,288 email2trac project:      Message part: Content-Type: text/plain
2011-08-16 14:37:40,288 email2trac project: function inline_part()
2011-08-16 14:37:40,289 email2trac project: function unique_attachment_names()
2011-08-16 14:37:40,289 email2trac project: function get_body_text()
2011-08-16 14:37:40,335 email2trac project: function attach_attachments()
2011-08-16 14:37:40,335 email2trac project: function notify()
2011-08-16 14:37:40,335 email2trac project:      Notify reporter set
2011-08-16 14:37:40,336 email2trac project:      Using Email2TracNotification function AlwaysNotifyReporter
2011-08-16 14:37:40,432 email2trac project: Failure sending notification on creation of ticket #118: 'NoneType' object has no attribute 'replace'
saving email to /tmp/tmpyuLxBO.email2trac
writing body to /tmp/tmphu9l46.email2trac

/tmp/tmpyuLxBO.email2trac: From noc@… Wed Mar 8 15:29:17 2006 Return-Path: <noc@…> X-Original-To: test-user@… Delivered-To: test-user@… Received: from smtp.host.com (smtp.host.com [1.1.1.1])

by localhost.localdomain (Postfix) with ESMTP id 507352800682 for <test-user@…>; Tue, 16 Aug 2011 15:29:17 +0100 (EET)

Message-ID: <440EFD9A.6070200@…> Date: Tue, 16 Aug 2011 15:29:15 -0400 From: NOC <noc@…> User-Agent: elm 2.8 (Windows/20051201) MIME-Version: 1.0 To: test-user@… Subject: Test1234567890 Content-Type: multipart/mixed; boundary="------------070800080005060203060809" X-OriginalArrivalTime?: 16 Aug 2011 15:29:17.0190 (UTC)

FILETIME=[AE40B940:01C642BC]

This is a multi-part message in MIME format.


Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit

Test12345 Test12345

-- --

  • *
  • NOC e-mail: noc@… *
  • *


Content-Type: text/plain;

name="basje.txt"

Content-Transfer-Encoding: 7bit Content-Disposition: inline;

filename="basje.txt"

test12345 test12345


/tmp/tmphu9l46.email2trac:

Test12345
Test12345

--
--
********************************************************************
*                                                                  *
*  NOC                                   e-mail: noc@host.com    *
*                                                                  *
********************************************************************

test12345
test12345

/etc/email2trac.conf:
[DEFAULT]
parentdir: /some/where
umask: 022
spam_level: 1
reply_all : 0
mailto_link: 0
umask: 022
email_header: 0
trac_version: 0.12
enable_syslog : 0
debug: 99
log_type: file
log_file: /tmp/email2trac.log
log_level: DEBUG
mailto_cc: 0
mailto_link: 0
notify_reporter: 1
# alternate_notify_template :
# alternate_notify_template_update :
drop_spam : 0
verbatim_format: 1
strip_signature: 0
email_quote: >
strip_quotes: 0
ignore_trac_user_settings: 0
black_list: MAILER-DAEMON@
drop_alternative_html_version: 1
ticket_update: 1
# workflow_<ticket status>: <workflow name>
workflow_closed: reopen
workflow_infoneeded: provideinfo
support_component: support
devel_component : devel

[project]
debug: 99
sh # python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.4/site.pyc matches /usr/lib/python2.4/site.py
import site # precompiled from /usr/lib/python2.4/site.pyc
# /usr/lib/python2.4/os.pyc matches /usr/lib/python2.4/os.py
import os # precompiled from /usr/lib/python2.4/os.pyc
import posix # builtin
# /usr/lib/python2.4/posixpath.pyc matches /usr/lib/python2.4/posixpath.py
import posixpath # precompiled from /usr/lib/python2.4/posixpath.pyc
# /usr/lib/python2.4/stat.pyc matches /usr/lib/python2.4/stat.py
import stat # precompiled from /usr/lib/python2.4/stat.pyc
import errno # builtin
# /usr/lib/python2.4/UserDict.pyc matches /usr/lib/python2.4/UserDict.py
import UserDict # precompiled from /usr/lib/python2.4/UserDict.pyc
# /usr/lib/python2.4/copy_reg.pyc matches /usr/lib/python2.4/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.4/copy_reg.pyc
# /usr/lib/python2.4/types.pyc matches /usr/lib/python2.4/types.py
import types # precompiled from /usr/lib/python2.4/types.pyc
# zipimport: found 53 names in /usr/lib/python2.4/site-packages/Genshi-0.6-py2.4.egg
# zipimport: found 516 names in /usr/lib/python2.4/site-packages/Trac-0.12.2-py2.4.egg
# zipimport: found 36 names in /usr/lib/python2.4/site-packages/MySQL_python-1.2.3-py2.4-linux-i686.egg
# zipimport: found 52 names in /usr/lib/python2.4/site-packages/TracAccountManager-0.3dev-py2.4.egg
# zipimport: found 11 names in /usr/lib/python2.4/site-packages/PageAuthzPolicyEditor-0.1dev_r3719-py2.4.egg
import japanese # directory /usr/lib/python2.4/site-packages/japanese
# /usr/lib/python2.4/site-packages/japanese/__init__.pyc matches /usr/lib/python2.4/site-packages/japanese/__init__.py
import japanese # precompiled from /usr/lib/python2.4/site-packages/japanese/__init__.pyc
import japanese.aliases # directory /usr/lib/python2.4/site-packages/japanese/aliases
# /usr/lib/python2.4/site-packages/japanese/aliases/__init__.pyc matches /usr/lib/python2.4/site-packages/japanese/aliases/__init__.py
import japanese.aliases # precompiled from /usr/lib/python2.4/site-packages/japanese/aliases/__init__.pyc
import encodings # directory /usr/lib/python2.4/encodings
# /usr/lib/python2.4/encodings/__init__.pyc matches /usr/lib/python2.4/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.4/encodings/__init__.pyc
# /usr/lib/python2.4/codecs.pyc matches /usr/lib/python2.4/codecs.py
import codecs # precompiled from /usr/lib/python2.4/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.4/encodings/aliases.pyc matches /usr/lib/python2.4/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.4/encodings/aliases.pyc
# /usr/lib/python2.4/warnings.pyc matches /usr/lib/python2.4/warnings.py
import warnings # precompiled from /usr/lib/python2.4/warnings.pyc
# /usr/lib/python2.4/linecache.pyc matches /usr/lib/python2.4/linecache.py
import linecache # precompiled from /usr/lib/python2.4/linecache.pyc
# /usr/lib/python2.4/encodings/utf_8.pyc matches /usr/lib/python2.4/encodings/utf_8.py
import encodings.utf_8 # precompiled from /usr/lib/python2.4/encodings/utf_8.pyc
Python 2.4.3 (#1, Mar  5 2011, 21:25:56)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib/python2.4/lib-dynload/readline.so", 2);
import readline # dynamically loaded from /usr/lib/python2.4/lib-dynload/readline.so

Change History (5)

comment:1 follow-up: Changed 9 years ago by bas

  • Version changed from 2.4.0 to 2.1.0

which email2trac version do you use? I just tested it with latest release and everthing worked as expected. If you unset notify_reporter. Does email2tarc still crashes

comment:2 Changed 9 years ago by bas

  • Status changed from new to assigned

comment:3 Changed 9 years ago by bas

  • Description modified (diff)

comment:4 in reply to: ↑ 1 Changed 9 years ago by anonymous

Replying to bas:

which email2trac version do you use? I just tested it with latest release and everthing worked as expected. If you unset notify_reporter. Does email2tarc still crashes

email2trac-2.1.0

comment:5 Changed 9 years ago by bas

  • Description modified (diff)

Did you also unset notify_reporter does this prevent the crash

Note: See TracTickets for help on using tickets.