Modify

Opened 7 months ago

Last modified 7 months ago

#446 assigned enhancement

How to fix: email2trac test: ImportError: cannot import name TicketNotifyEmail

Reported by: slevin@… Owned by: bas
Priority: major Milestone:
Component: email2trac Version: trunk
Keywords: trac1.4 TicketNotifyEmail Cc: slevin@…

Description

Hello Bas!

Several years ago we're talking via email about email2trac plugin. I hope you're continue developing and supporting email2trac plugin. As you already uderstanding - I have some a little (?) problem again, but now with email2trac version 2.12.2 (src from git repository) and trac version 1.4 (stable). Our company ask me upgrade as old trac v.0.12.3 to latest stable... I was done moved all as trac to 1.4 and enabled mostly popular plugins for 1.4. Adding email2trac should be a last step, but... but... but...

The message from email2trac in log like:

2020-02-19 19:51:32,322 email2trac test: Found trac version: 1.4
2020-02-19 19:51:32,322 email2trac test: TRAC version 1.4 is not supported

that was not a problem - I finded ticket in yours trac about it and maked changes - add ,'1.4' into code "if version in ....

But after that I geted more seriosly problem for me:

2020-02-19 20:14:16,010 email2trac test:   File "/usr/bin/email2trac", line 2913, in <module>
    from trac.ticket.notification import TicketNotifyEmail
2020-02-19 20:14:16,010 email2trac test: ImportError: cannot import name TicketNotifyEmail

As you remember - I not a profi in python code , can read code and apply the fixes. As I guess the problem near module names in 1.4 trac.

Can you help me with that?

I hope you're not a strong busy atm. I'm ready to testing any idea fro solution problem.

PS: o'course I can made the ticket in yours trac if it need - required?

Attachments (2)

email2trac1.4.patch (1.2 KB) - added by Sergey V.Levin <slevin@…> 7 months ago.
patch_2.patch (1.6 KB) - added by anonymous 7 months ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 7 months ago by bas

  • Status changed from new to assigned
  • Type changed from defect to enhancement

We are still using an old Trac version and are also not planning to upgrade to a new version. Because our company now user other tools Gitab/Jira?. I think they changed the notification system in version 1.4.

I am not that familiar with the source any more. So You can better ask on the trac mailing list if this is the case and maybe they have a solution that we can apply on the email2trac source.

The solution can be that we have to remove the notification code for version 1.4

comment:2 Changed 7 months ago by anonymous

Can you help me to try disable notify in code? I can apply it and check it very quick. Bas, I'm really need yors help. If you have a time and if you want to fix email2trac for trac v.1.4+ - that it situation here, c'mon let do it!

PS: I'm have not received notify from that trac on creation ticket, and havn't received any notification about yours answer in that ticket.

comment:3 Changed 7 months ago by Sergey V.Levin <slevin@…>

  • Cc slevin@… added

In API docs

 class trac.ticket.notification.TicketNotifyEmail(env)

    Notification of ticket changes.
    Since 1.1.3:	deprecated and will be removed in 1.3.1

:( module was deprecated and I have no idea wht to do...

comment:4 Changed 7 months ago by bas

I do not have a 1.3 or 1.4 installation available. The email2trac code has extend the TicketNotifyEmail class to rewrite email headers.

In this ticket they did an easy port to the new notification. I think we need to switch to the easy notification system:

That means replace all:

  • self.notify() function call
  • replace them with NotificationSystem(self.env).notify

comment:5 Changed 7 months ago by bas

This is the best I can do. The code must also be ported to python 3. I have tried to use the native trac notification system. I can not test it and neither we can use 1.3 or 1.4 versions. So for our organization it works as expected and TRAC will be phased out.

So check the stuff on gitlab and use branch 1.4_changes hopefully it works as expected

Changed 7 months ago by Sergey V.Levin <slevin@…>

comment:6 Changed 7 months ago by Sergey V.Levin <slevin@…>

  • Cc slevin@… removed

Thank you, Bas for quick answer and support, I go to try it fix...

A little patch for synax

Results:

email2trac LOG:

# cat email2trac.log 
2020-02-20 17:43:41,229 email2trac test: Found trac version: 1.4
2020-02-20 17:43:41,416 email2trac test: Loading environment /var/lib/trac/test
2020-02-20 17:43:42,185 email2trac test: This email settings are set via trac.ini
2020-02-20 17:43:42,185 email2trac test:         trac_smtp_from : tracker@adriver.ru
2020-02-20 17:43:42,186 email2trac test:         smtp_default_domain : adriver.ru
2020-02-20 17:43:42,186 email2trac test:         smtp_replyto : tracker@adriver.ru
2020-02-20 17:43:42,186 email2trac test:         trac_smtp_always_cc : 
2020-02-20 17:43:42,186 email2trac test:         trac_smtp_always_bcc : 
2020-02-20 17:43:42,186 email2trac test: Main function parse
2020-02-20 17:43:42,188 email2trac test: saving email to /tmp/testXELgRY.email2trac
2020-02-20 17:43:42,190 email2trac test: function get_message_parts()
2020-02-20 17:43:42,190 email2trac test:         Message part: Main-Type: text
2020-02-20 17:43:42,191 email2trac test:         Message part: Content-Type: text/plain
2020-02-20 17:43:42,191 email2trac test: function inline_part()
2020-02-20 17:43:42,191 email2trac test: function email_to_unicode
2020-02-20 17:43:42,191 email2trac test:         repr:None type:<type 'NoneType'>
2020-02-20 17:43:42,214 email2trac test:         unicode filename: None
2020-02-20 17:43:42,214 email2trac test:         raw filename: None
2020-02-20 17:43:42,215 email2trac test: function strip_signature: ^-- $
2020-02-20 17:43:42,215 email2trac test:        "--  "  matched, skiping rest of message
2020-02-20 17:43:42,215 email2trac test: function strip_quotes: >
2020-02-20 17:43:42,216 email2trac test: function inline_properties
2020-02-20 17:43:42,217 email2trac test: function unique_attachment_names()
2020-02-20 17:43:42,217 email2trac test: function get_body_text()
2020-02-20 17:43:42,217 email2trac test: function debug_body:
2020-02-20 17:43:42,217 email2trac test: writing body to /tmp/testXELgRY.email2trac.body
2020-02-20 17:43:42,217 email2trac test: function debug_attachments
2020-02-20 17:43:42,219 email2trac test: Traceback (most recent call last):

2020-02-20 17:43:42,219 email2trac test:   File "/usr/bin/email2trac", line 2974, in <module>
    tktparser.parse(sys.stdin)

2020-02-20 17:43:42,219 email2trac test:   File "/usr/bin/email2trac", line 1825, in parse
    self.db = self.env.get_read_db()

2020-02-20 17:43:42,220 email2trac test: AttributeError: 'Environment' object has no attribute 'get_read_db'

2020-02-20 17:43:42,220 email2trac test: saving email to /tmp/testj5GhHF.email2trac
2020-02-20 17:43:42,222 email2trac test: function get_message_parts()
2020-02-20 17:43:42,223 email2trac test:         Message part: Main-Type: text
2020-02-20 17:43:42,223 email2trac test:         Message part: Content-Type: text/plain
2020-02-20 17:43:42,223 email2trac test: function inline_part()
2020-02-20 17:43:42,223 email2trac test: function email_to_unicode
2020-02-20 17:43:42,223 email2trac test:         repr:None type:<type 'NoneType'>
2020-02-20 17:43:42,224 email2trac test:         unicode filename: None
2020-02-20 17:43:42,224 email2trac test:         raw filename: None
2020-02-20 17:43:42,224 email2trac test: function strip_signature: ^-- $
2020-02-20 17:43:42,224 email2trac test:        "--  "  matched, skiping rest of message
2020-02-20 17:43:42,224 email2trac test: function strip_quotes: >
2020-02-20 17:43:42,225 email2trac test: function inline_properties
2020-02-20 17:43:42,225 email2trac test: function unique_attachment_names()
2020-02-20 17:43:42,225 email2trac test: function get_body_text()
2020-02-20 17:43:42,225 email2trac test: function debug_body:
2020-02-20 17:43:42,226 email2trac test: writing body to /tmp/testj5GhHF.email2trac.body
2020-02-20 17:43:42,226 email2trac test: function debug_attachments

ticket was not created.

Trac LOG:

cat trac.log 
2020-02-20 18:02:31,687 Trac[env] INFO: -------------------------------- environment startup [Trac 1.4] --------------------------------
2020-02-20 18:02:31,916 Trac[loader] DEBUG: Loading plugin "trac.about" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:31,946 Trac[loader] DEBUG: Loading plugin "trac.admin.console" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:31,950 Trac[loader] DEBUG: Loading plugin "trac.admin.web_ui" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:31,951 Trac[loader] DEBUG: Loading plugin "trac.attachment" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:31,952 Trac[loader] DEBUG: Loading plugin "trac.db.mysql" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:31,983 Trac[loader] DEBUG: Loading plugin "trac.db.postgres" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:31,985 Trac[loader] DEBUG: Skipping "trac.db.postgres = trac.db.postgres_backend": DistributionNotFound: The 'psycopg2>=2.0 or psycopg2-binary' distribution was not found and is required by Trac
2020-02-20 18:02:31,985 Trac[loader] DEBUG: Loading plugin "trac.db.sqlite" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:31,986 Trac[loader] DEBUG: Loading plugin "trac.mimeview.patch" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:31,987 Trac[loader] DEBUG: Loading plugin "trac.mimeview.pygments" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,015 Trac[loader] DEBUG: Loading plugin "trac.mimeview.rst" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,070 Trac[loader] DEBUG: Loading plugin "trac.mimeview.txtl" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,437 Trac[loader] DEBUG: Loading plugin "trac.notification.api" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,438 Trac[loader] DEBUG: Loading plugin "trac.notification.mail" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,439 Trac[loader] DEBUG: Loading plugin "trac.notification.prefs" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,441 Trac[loader] DEBUG: Loading plugin "trac.prefs" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,443 Trac[loader] DEBUG: Loading plugin "trac.search" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,445 Trac[loader] DEBUG: Loading plugin "trac.ticket.admin" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,447 Trac[loader] DEBUG: Loading plugin "trac.ticket.batch" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,449 Trac[loader] DEBUG: Loading plugin "trac.ticket.notification" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,449 Trac[loader] DEBUG: Loading plugin "trac.ticket.query" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,453 Trac[loader] DEBUG: Loading plugin "trac.ticket.report" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,458 Trac[loader] DEBUG: Loading plugin "trac.ticket.roadmap" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,459 Trac[loader] DEBUG: Loading plugin "trac.ticket.web_ui" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,460 Trac[loader] DEBUG: Loading plugin "trac.timeline" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,462 Trac[loader] DEBUG: Loading plugin "trac.versioncontrol.admin" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,463 Trac[loader] DEBUG: Loading plugin "trac.versioncontrol.svn_authz" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,465 Trac[loader] DEBUG: Loading plugin "trac.versioncontrol.web_ui" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,476 Trac[loader] DEBUG: Loading plugin "trac.web.auth" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,482 Trac[loader] DEBUG: Loading plugin "trac.web.main" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,484 Trac[loader] DEBUG: Loading plugin "trac.web.session" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,485 Trac[loader] DEBUG: Loading plugin "trac.wiki.admin" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,487 Trac[loader] DEBUG: Loading plugin "trac.wiki.interwiki" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,488 Trac[loader] DEBUG: Loading plugin "trac.wiki.macros" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,488 Trac[loader] DEBUG: Loading plugin "trac.wiki.web_api" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,489 Trac[loader] DEBUG: Loading plugin "trac.wiki.web_ui" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,491 Trac[loader] DEBUG: Loading plugin "tracopt.perm.authz_policy" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,493 Trac[loader] DEBUG: Loading plugin "tracopt.perm.config_perm_provider" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,494 Trac[loader] DEBUG: Loading plugin "tracopt.ticket.clone" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,495 Trac[loader] DEBUG: Loading plugin "tracopt.ticket.commit_updater" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,497 Trac[loader] DEBUG: Loading plugin "tracopt.ticket.deleter" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,498 Trac[loader] DEBUG: Loading plugin "tracopt.versioncontrol.git.git_fs" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,505 Trac[loader] DEBUG: Loading plugin "tracopt.versioncontrol.svn.svn_fs" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,508 Trac[loader] DEBUG: Loading plugin "tracopt.versioncontrol.svn.svn_prop" from "/usr/local/lib/python2.7/dist-packages"
2020-02-20 18:02:32,509 Trac[loader] DEBUG: Loading plugin "tractoc.macro" from "/usr/local/lib/python2.7/dist-packages"

comment:7 Changed 7 months ago by Sergey V.Levin <slevin@…>

  • Cc slevin@… added

PS: trac log was maked several minutes after from another letter with the same result. Trac base in sqlite. All looks like normal, but ticket from email do not created.

comment:8 Changed 7 months ago by bas

` self.db = self.env.get_read_db() `

Is also old code replaced with new code in the same branch. But I suspect that we hit many more problems with version 1.3/1.4

comment:9 Changed 7 months ago by Sergey V.Levin <slevin@…>

  • Cc slevin@… removed

email2trac.log:

2020-02-20 18:51:32,697 email2trac test: Found trac version: 1.4
2020-02-20 18:51:32,896 email2trac test: Loading environment /var/lib/trac/test
2020-02-20 18:51:33,701 email2trac test: This email settings are set via trac.ini
2020-02-20 18:51:33,701 email2trac test:         trac_smtp_from : tracker@adriver.ru
2020-02-20 18:51:33,701 email2trac test:         smtp_default_domain : adriver.ru
2020-02-20 18:51:33,701 email2trac test:         smtp_replyto : tracker@adriver.ru
2020-02-20 18:51:33,701 email2trac test:         trac_smtp_always_cc : 
2020-02-20 18:51:33,701 email2trac test:         trac_smtp_always_bcc : 
2020-02-20 18:51:33,701 email2trac test: Main function parse
2020-02-20 18:51:33,703 email2trac test: saving email to /tmp/testZRJjIt.email2trac
2020-02-20 18:51:33,706 email2trac test: function get_message_parts()
2020-02-20 18:51:33,706 email2trac test:         Message part: Main-Type: text
2020-02-20 18:51:33,706 email2trac test:         Message part: Content-Type: text/plain
2020-02-20 18:51:33,706 email2trac test: function inline_part()
2020-02-20 18:51:33,706 email2trac test: function email_to_unicode
2020-02-20 18:51:33,706 email2trac test:         repr:None type:<type 'NoneType'>
2020-02-20 18:51:33,707 email2trac test:         unicode filename: None
2020-02-20 18:51:33,707 email2trac test:         raw filename: None
2020-02-20 18:51:33,708 email2trac test: function strip_signature: ^-- $
2020-02-20 18:51:33,708 email2trac test:        "--  "  matched, skiping rest of message
2020-02-20 18:51:33,708 email2trac test: function strip_quotes: >
2020-02-20 18:51:33,708 email2trac test: function inline_properties
2020-02-20 18:51:33,709 email2trac test: function unique_attachment_names()
2020-02-20 18:51:33,709 email2trac test: function get_body_text()
2020-02-20 18:51:33,709 email2trac test: function debug_body:
2020-02-20 18:51:33,709 email2trac test: writing body to /tmp/testZRJjIt.email2trac.body
2020-02-20 18:51:33,710 email2trac test: function debug_attachments
2020-02-20 18:51:33,711 email2trac test: Traceback (most recent call last):

2020-02-20 18:51:33,711 email2trac test:   File "/usr/bin/email2trac", line 2975, in <module>
    tktparser.parse(sys.stdin)

2020-02-20 18:51:33,711 email2trac test:   File "/usr/bin/email2trac", line 1826, in parse
    self.db = self.env.db_query()

2020-02-20 18:51:33,711 email2trac test: TypeError: execute() takes at least 2 arguments (1 given)

2020-02-20 18:51:33,711 email2trac test: saving email to /tmp/testuxBj3h.email2trac
2020-02-20 18:51:33,713 email2trac test: function get_message_parts()
2020-02-20 18:51:33,713 email2trac test:         Message part: Main-Type: text
2020-02-20 18:51:33,713 email2trac test:         Message part: Content-Type: text/plain
2020-02-20 18:51:33,713 email2trac test: function inline_part()
2020-02-20 18:51:33,713 email2trac test: function email_to_unicode
2020-02-20 18:51:33,713 email2trac test:         repr:None type:<type 'NoneType'>
2020-02-20 18:51:33,714 email2trac test:         unicode filename: None
2020-02-20 18:51:33,714 email2trac test:         raw filename: None
2020-02-20 18:51:33,714 email2trac test: function strip_signature: ^-- $
2020-02-20 18:51:33,714 email2trac test:        "--  "  matched, skiping rest of message
2020-02-20 18:51:33,714 email2trac test: function strip_quotes: >
2020-02-20 18:51:33,714 email2trac test: function inline_properties
2020-02-20 18:51:33,715 email2trac test: function unique_attachment_names()
2020-02-20 18:51:33,715 email2trac test: function get_body_text()
2020-02-20 18:51:33,715 email2trac test: function debug_body:
2020-02-20 18:51:33,715 email2trac test: writing body to /tmp/testuxBj3h.email2trac.body
2020-02-20 18:51:33,715 email2trac test: function debug_attachments

Looks like an overquoting of a log, further to answer only a part about an error?

comment:10 Changed 7 months ago by bas

The DB api has been changed and each connection to the DB must be rewritten:

We now use an global connection to the DB that is not possible any more. So every where we need to query the DB we must setup an connection. There are many examples on that page.

comment:11 Changed 7 months ago by slevin@…

So, I catch some time to try to make some fix... Problem with creation of new ticket now solved, patch in attachments.

At the moment we're have following errors:

2020-03-04 12:00:03,105 email2trac test: Found trac version: 1.4
2020-03-04 12:00:03,289 email2trac test: Loading environment /var/lib/trac/test
2020-03-04 12:00:04,081 email2trac test: This email settings are set via trac.ini
2020-03-04 12:00:04,081 email2trac test:         trac_smtp_from : tracker@adriver.ru
2020-03-04 12:00:04,081 email2trac test:         smtp_default_domain : adriver.ru
2020-03-04 12:00:04,082 email2trac test:         smtp_replyto : tracker@adriver.ru
2020-03-04 12:00:04,082 email2trac test:         trac_smtp_always_cc :
2020-03-04 12:00:04,082 email2trac test:         trac_smtp_always_bcc :
2020-03-04 12:00:04,082 email2trac test: Main function parse
2020-03-04 12:00:04,084 email2trac test: saving email to /tmp/testIjTqCU.email2trac
2020-03-04 12:00:04,086 email2trac test: function get_message_parts()
2020-03-04 12:00:04,086 email2trac test:         Message part: Main-Type: text
2020-03-04 12:00:04,086 email2trac test:         Message part: Content-Type: text/plain
2020-03-04 12:00:04,086 email2trac test: function inline_part()
2020-03-04 12:00:04,087 email2trac test: function email_to_unicode
2020-03-04 12:00:04,087 email2trac test:         repr:None type:<type 'NoneType'>
2020-03-04 12:00:04,087 email2trac test:         unicode filename: None
2020-03-04 12:00:04,087 email2trac test:         raw filename: None
2020-03-04 12:00:04,088 email2trac test: function strip_signature: ^-- $
2020-03-04 12:00:04,088 email2trac test:        "--  "  matched, skiping rest of message
2020-03-04 12:00:04,088 email2trac test: function strip_quotes: >
2020-03-04 12:00:04,088 email2trac test: function inline_properties
2020-03-04 12:00:04,089 email2trac test: function unique_attachment_names()
2020-03-04 12:00:04,089 email2trac test: function get_body_text()
2020-03-04 12:00:04,089 email2trac test: function debug_body:
2020-03-04 12:00:04,089 email2trac test: writing body to /tmp/testIjTqCU.email2trac.body
2020-03-04 12:00:04,090 email2trac test: function debug_attachments
2020-03-04 12:00:04,091 email2trac test: Main function parse: type(db) = [<class 'trac.db.util.ConnectionWrapper'>]
2020-03-04 12:00:04,091 email2trac test: function get_sender_info
2020-03-04 12:00:04,091 email2trac test: function email_to_unicode
2020-03-04 12:00:04,092 email2trac test:         repr:'slevin@adriver.ru' type:<type 'str'>
2020-03-04 12:00:04,092 email2trac test:         email name: slevin@adriver.ru, email address: slevin@adriver.ru
2020-03-04 12:00:04,092 email2trac test: function email_to_unicode
2020-03-04 12:00:04,092 email2trac test:         repr:'=?UTF-8?B?dGVzdCAjMjQg0J/RgNC40LLQtdGCLCDQv9GA0L7QstC10YDQutCwINC6?= =?UTF-8?B?0LjRgNC40LvQu9C40YbRiw==?=' type:<type 'str'>
2020-03-04 12:00:04,092 email2trac test: function email_header_acl: white_list
2020-03-04 12:00:04,092 email2trac test:         white_list not defined, all messages are allowed.
2020-03-04 12:00:04,092 email2trac test: function email_header_acl: black_list
2020-03-04 12:00:04,093 email2trac test: function email_header_acl: recipient_list
2020-03-04 12:00:04,093 email2trac test:         recipient_list not defined, all messages are allowed.
2020-03-04 12:00:04,093 email2trac test: function spam
2020-03-04 12:00:04,093 email2trac test: function spam
2020-03-04 12:00:04,093 email2trac test: subject parsing: u'test #24 \u041f\u0440\u0438\u0432\u0435\u0442, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u0438\u0440\u0438\u043b\u043b\u0438\u0446\u044b'
2020-03-04 12:00:04,093 email2trac test: function parse_subject_header
2020-03-04 12:00:04,094 email2trac test: function new_ticket
2020-03-04 12:00:04,102 email2trac test: function set_cc_fields
2020-03-04 12:00:04,102 email2trac test: function set_ticket_fields
2020-03-04 12:00:04,102 email2trac test: trac[summary] =
2020-03-04 12:00:04,102 email2trac test: trac[reporter] =
2020-03-04 12:00:04,102 email2trac test: trac[owner] = < default >
2020-03-04 12:00:04,103 email2trac test: used owner = < default >
2020-03-04 12:00:04,103 email2trac test: trac[description] =
2020-03-04 12:00:04,103 email2trac test: trac[type] = defect
2020-03-04 12:00:04,103 email2trac test: used type = defect
2020-03-04 12:00:04,103 email2trac test: trac[status] =
2020-03-04 12:00:04,103 email2trac test: trac[priority] = major
2020-03-04 12:00:04,103 email2trac test: used priority = major
2020-03-04 12:00:04,103 email2trac test: trac[milestone] =
2020-03-04 12:00:04,104 email2trac test: trac[component] =
2020-03-04 12:00:04,104 email2trac test: email2trac[component] = general
2020-03-04 12:00:04,104 email2trac test: used component = general
2020-03-04 12:00:04,104 email2trac test: trac[version] =
2020-03-04 12:00:04,104 email2trac test: trac[resolution] = None
2020-03-04 12:00:04,104 email2trac test: email2trac[resolution] = new
2020-03-04 12:00:04,104 email2trac test: used resolution = new
2020-03-04 12:00:04,104 email2trac test: trac[keywords] =
2020-03-04 12:00:04,105 email2trac test: trac[cc] =
2020-03-04 12:00:04,105 email2trac test: trac[time] =
2020-03-04 12:00:04,105 email2trac test: trac[changetime] =
2020-03-04 12:00:04,105 email2trac test: function update_ticket_fields
2020-03-04 12:00:04,105 email2trac test: user_field      owner = < default >
2020-03-04 12:00:04,105 email2trac test: ticket_field    owner = < default >
2020-03-04 12:00:04,105 email2trac test: user_field      priority = major
2020-03-04 12:00:04,105 email2trac test: ticket_field    priority = major
2020-03-04 12:00:04,106 email2trac test: user_field      component = general
2020-03-04 12:00:04,106 email2trac test: ticket_field    component = general
2020-03-04 12:00:04,106 email2trac test: user_field      type = defect
2020-03-04 12:00:04,106 email2trac test: ticket_field    type = defect
2020-03-04 12:00:04,106 email2trac test: user_field      resolution = new
2020-03-04 12:00:04,106 email2trac test: ticket_field    resolution = None
2020-03-04 12:00:04,106 email2trac test: function get_message_parts()
2020-03-04 12:00:04,106 email2trac test:         Message part: Main-Type: text
2020-03-04 12:00:04,107 email2trac test:         Message part: Content-Type: text/plain
2020-03-04 12:00:04,107 email2trac test: function inline_part()
2020-03-04 12:00:04,107 email2trac test: function email_to_unicode
2020-03-04 12:00:04,107 email2trac test:         repr:None type:<type 'NoneType'>
2020-03-04 12:00:04,107 email2trac test:         unicode filename: None
2020-03-04 12:00:04,107 email2trac test:         raw filename: None
2020-03-04 12:00:04,108 email2trac test: function strip_signature: ^-- $
2020-03-04 12:00:04,108 email2trac test:        "--  "  matched, skiping rest of message
2020-03-04 12:00:04,108 email2trac test: function strip_quotes: >
2020-03-04 12:00:04,108 email2trac test: function inline_properties
2020-03-04 12:00:04,108 email2trac test: function unique_attachment_names()
2020-03-04 12:00:04,108 email2trac test: function get_body_text()
2020-03-04 12:00:04,113 email2trac test: function attach_attachments()
2020-03-04 12:00:04,114 email2trac test: function mail_workflow:
2020-03-04 12:00:04,115 email2trac test: Traceback (most recent call last):

2020-03-04 12:00:04,115 email2trac test:   File "/usr/bin/email2trac", line 2977, in <module>
    tktparser.parse(sys.stdin)

2020-03-04 12:00:04,115 email2trac test:   File "/usr/bin/email2trac", line 1886, in parse
    self.parse_subject_field(m, subject, spam_msg)

2020-03-04 12:00:04,116 email2trac test:   File "/usr/bin/email2trac", line 2031, in parse_subject_field
    self.new_ticket(m, subject, spam_msg)

2020-03-04 12:00:04,116 email2trac test:   File "/usr/bin/email2trac", line 1403, in new_ticket
    NotificationSystem( self.env ).notify( event )

2020-03-04 12:00:04,116 email2trac test: NameError: global name 'NotificationSystem' is not defined

2020-03-04 12:00:04,116 email2trac test: saving email to /tmp/test6JUMuv.email2trac
2020-03-04 12:00:04,117 email2trac test: function get_message_parts()
2020-03-04 12:00:04,117 email2trac test:         Message part: Main-Type: text
2020-03-04 12:00:04,118 email2trac test:         Message part: Content-Type: text/plain
2020-03-04 12:00:04,118 email2trac test: function inline_part()
2020-03-04 12:00:04,118 email2trac test: function email_to_unicode
2020-03-04 12:00:04,118 email2trac test:         repr:None type:<type 'NoneType'>
2020-03-04 12:00:04,118 email2trac test:         unicode filename: None
2020-03-04 12:00:04,118 email2trac test:         raw filename: None
2020-03-04 12:00:04,119 email2trac test: function strip_signature: ^-- $
2020-03-04 12:00:04,119 email2trac test:        "--  "  matched, skiping rest of message
2020-03-04 12:00:04,119 email2trac test: function strip_quotes: >
2020-03-04 12:00:04,119 email2trac test: function inline_properties
2020-03-04 12:00:04,119 email2trac test: function unique_attachment_names()
2020-03-04 12:00:04,119 email2trac test: function get_body_text()
2020-03-04 12:00:04,120 email2trac test: function debug_body:
2020-03-04 12:00:04,120 email2trac test: writing body to /tmp/test6JUMuv.email2trac.body
2020-03-04 12:00:04,120 email2trac test: function debug_attachments

Changed 7 months ago by anonymous

comment:12 Changed 7 months ago by bas

Thanks for the patch I will try to fix the other error

comment:13 Changed 7 months ago by Sergey V.Levin <slevin@…>

  • Cc slevin@… added

Bas, can I help to you with fixes email2trac for trac 1.4? As you understand - I have installed trac engine v.1.4 with several ported tracs from trac engine v.0.12.3 and with latest version on email2trac plugin with ours patches. I can testing any ideas and report about results quick. I'm ready to help you.

Add Comment

Modify Ticket

Change Properties
Action
as assigned The owner will remain bas.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from bas to the specified user. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.