Mailing List Archive

email2trac
Hi,

for hours now, I am trying to get this script running.
At this point, I get a permission problem:

to="/usr/lib/sendmail.d/bin/run_email2trac",
ctladdr=<hd@jsubversion01.net.j.intershop.de> (2/0), delay=00:00:01,
xdelay=00:00:00, mailer=*file*, pri=30775, dsn=5.0.0, stat=Can't create
output

But my real question is: If I run run_email2trac from a shell, shouldn't
it bypass any permission problems caused by my MTA (sendmail?) I am
asking because I do not get any ticket in my trac if I call email2trac
manually - and I do not get any errors.
My config is simple:

[DEFAULT]
project: /svn/trac/test
umask: 022
reply_address: 1
reply_all : 1
mailto_link: 0
mailto_cc: root@localhost
email_comment: >
email_header: 0
trac_version: 0.9
enable_syslog: 1
debug: 1

Rainer
_______________________________________________
Trac mailing list
Trac@lists.edgewall.com
http://lists.edgewall.com/mailman/listinfo/trac
Re: email2trac [ In reply to ]
On Tue, Sep 25, 2007 at 02:31:43PM -0000, .M. wrote:

> While trac-hacks.org is down *gulp* could I trouble someone for a copy
> of the most recent version of email2trac?

The home page is at https://subtrac.sara.nl/oss/email2trac

Rainer

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Re: email2trac [ In reply to ]
On Tue, Sep 25, 2007 at 04:38:47PM +0200, Rainer Sokoll wrote:
>
> On Tue, Sep 25, 2007 at 02:31:43PM -0000, .M. wrote:
>
> > While trac-hacks.org is down *gulp* could I trouble someone for a copy
> > of the most recent version of email2trac?
>
> The home page is at https://subtrac.sara.nl/oss/email2trac
>
> Rainer

No such luck for xmlrpcplugin, though; isn't it hosted at trac-hacks? I
can't find an alternate download location. Darn; I wish I had a mirror
setup to offer....

=-=-> Jenn Drummond // jenn@rice.edu
Project Developer, Connexions Project (cnx.org)
Rice University



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Re: email2trac [ In reply to ]
Hi

coderanger have a "thmirror" at https://trachacks.coderanger.net --- An old
mirror of trac-hacks.org, will be up until trac-hacks is back. Please don't
change anything as obviously it won't be maintained on the main site.

Try it out, maybe it will give you what you need.

Cheers / Erik

On 9/25/07, Jennifer A. Drummond <jenn@io.com> wrote:
>
>
> On Tue, Sep 25, 2007 at 04:38:47PM +0200, Rainer Sokoll wrote:
> >
> > On Tue, Sep 25, 2007 at 02:31:43PM -0000, .M. wrote:
> >
> > > While trac-hacks.org is down *gulp* could I trouble someone for a copy
> > > of the most recent version of email2trac?
> >
> > The home page is at https://subtrac.sara.nl/oss/email2trac
> >
> > Rainer
>
> No such luck for xmlrpcplugin, though; isn't it hosted at trac-hacks? I
> can't find an alternate download location. Darn; I wish I had a mirror
> setup to offer....
>
> =-=-> Jenn Drummond // jenn@rice.edu
> Project Developer, Connexions Project (cnx.org)
> Rice University
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Re: email2trac [ In reply to ]
On Tue, Jun 20, 2023 at 11:39?PM Frank R. <frank.reifenstahl@gmail.com> wrote:
>
> I just succeeded updating a server from Ubuntu 16.04 to 18.04 and Trac from 1.0 to 1.4.. Everything seems to work fine, but email2trac. I checked passing a mail file on command line to it, it returns without errors, but no new ticke in Trac.
>
> Does anyone recognize that behaviour after updating to 1.4.? Suggestions are welcome.
>
> Regards
> Frank

email2trac 2.14.0 and early doesn't support Trac 1.4.
Instead, try master branch of the following repository:

https://gitlab.com/surfsara/email2trac
https://gitlab.com/surfsara/email2trac/-/merge_requests/10
https://gitlab.com/surfsara/email2trac/-/commit/e74da21eee3c9d83b9a5a3a0008aee97f3fbf9e0

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMah8CfJoOwmrOnvrDaC%2BRAWTJm1QYU68qPG%2Brs3K4X%2B1fw%40mail.gmail.com.
Re: email2trac [ In reply to ]
Thanks a lot, that works!

Am Di., 20. Juni 2023 um 17:08 Uhr schrieb Jun Omae <jun66j5@gmail.com>:

> On Tue, Jun 20, 2023 at 11:39?PM Frank R. <frank.reifenstahl@gmail.com>
> wrote:
> >
> > I just succeeded updating a server from Ubuntu 16.04 to 18.04 and Trac
> from 1.0 to 1.4.. Everything seems to work fine, but email2trac. I checked
> passing a mail file on command line to it, it returns without errors, but
> no new ticke in Trac.
> >
> > Does anyone recognize that behaviour after updating to 1.4.? Suggestions
> are welcome.
> >
> > Regards
> > Frank
>
> email2trac 2.14.0 and early doesn't support Trac 1.4.
> Instead, try master branch of the following repository:
>
> https://gitlab.com/surfsara/email2trac
> https://gitlab.com/surfsara/email2trac/-/merge_requests/10
>
> https://gitlab.com/surfsara/email2trac/-/commit/e74da21eee3c9d83b9a5a3a0008aee97f3fbf9e0
>
> --
> Jun Omae <jun66j5@gmail.com> (?? ?)
>
> --
> 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+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/CAEVLMah8CfJoOwmrOnvrDaC%2BRAWTJm1QYU68qPG%2Brs3K4X%2B1fw%40mail.gmail.com
> .
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CA%2ByhgXBdWhFBHNZDbHpxf7n-8Fp1S-FywfLRqeN83b_yZM7rZg%40mail.gmail.com.
Re: email2trac [ In reply to ]
Hi,

I hope it is ok to reanimate this thread, because...

During the past 3 weeks I went through several complete Trac 1.0 --> 1.4.
upgrade processes, everytime I got email2trac (the most recent dev version)
to work flawlessly. Last Sunday I did the process on our production
machine... and testing email2trac I got the following error:

Traceback (most recent call last):
File "/usr/local/bin/email2trac", line 2948, in <module>
tktparser.save_email_for_debug(m, settings.project_name)
File "/usr/local/bin/email2trac", line 620, in save_email_for_debug
fx.write(('%s' % message).encode())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
1424: ordinal not in range(128)

I had to reverse everything, because I did not find out why that
happened... the email2trac version running ist exactly the same as the
one on my test device, as is the python version....????????

Any ideas?

Thanks and regards

Frank

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CA%2ByhgXBxxQQgCCfeMgChh1xBq-KEAKe8NURXEbsV96997_L7Zw%40mail.gmail.com.
Re: email2trac [ In reply to ]
On Wed, Jul 12, 2023 at 8:31?PM Frank R. <frank.reifenstahl@gmail.com> wrote:
>
> Hi,
>
> I hope it is ok to reanimate this thread, because...
>
> During the past 3 weeks I went through several complete Trac 1.0 --> 1.4. upgrade processes, everytime I got email2trac (the most recent dev version) to work flawlessly. Last Sunday I did the process on our production machine... and testing email2trac I got the following error:
>
> Traceback (most recent call last):
> File "/usr/local/bin/email2trac", line 2948, in <module>
> tktparser.save_email_for_debug(m, settings.project_name)
> File "/usr/local/bin/email2trac", line 620, in save_email_for_debug
> fx.write(('%s' % message).encode())
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1424: ordinal not in range(128)
>
> I had to reverse everything, because I did not find out why that happened... the email2trac version running ist exactly the same as the one on my test device, as is the python version....????????
>
> Any ideas?
>
> Thanks and regards
>
> Frank

I'd suggest reporting it to email2trac's issue tracker [1].

[1] https://gitlab.com/surfsara/email2trac/-/issues/new

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMaiwteDTYbDufdmfjheDZXctyQL%3DwAjRf8p-zS4Z_3RARA%40mail.gmail.com.
Re: email2trac [ In reply to ]
As a official response ... Jun is correct, of course. Ignore what I say
below if that works for you.

Unofficially, I'd say 'ascii' probably isn't the intended encoding, but
that's just my guess. Is the encode() function really using a default
parameter for the encoding type? That seems strange to me, though I admit
I'm basically a casual Python programmer. I have always used an explicit
value for the encoding.

For instance, see here:

https://www.geeksforgeeks.org/how-to-fix-unicodeencodeerror-ascii-codec-cant-encode-character-uxa0-in-position-20-ordinal-not-in-range128-in-python/

I also found something about the version of Python ...

https://www.ibm.com/support/pages/execute-python-script-error-ascii-codec-cant-decode-byte-oxc3-position-2-orginal-not-range128

FWIW, I started learning Python just before Python 3 came out. Once I
learned there would be an incompatible change, I moved all our scripts to
Python 3 and tried to avoid Python 2 like the plague. So I don't know all
that much Python 2 lore, though I have ported some code from 2 to 3,
including the Bonjour library (but that was quite a while ago).

Are the versions of Python you're using in each case the same? If not,
maybe that's why your tests show different results than your production
migration. Or maybe the installations are using a different "default"
encoding for some reason. Or maybe that's all wrong and the data itself is
different, but I'm assuming the problem is in parsing an incoming e-mail,
and you're probably sending a very similar if not identical e-mail in each
case.

Good Luck.

On Wednesday, July 12, 2023 at 6:31:30?AM UTC-5 Frank R. wrote:

> Hi,
>
> I hope it is ok to reanimate this thread, because...
>
> During the past 3 weeks I went through several complete Trac 1.0 --> 1.4.
> upgrade processes, everytime I got email2trac (the most recent dev version)
> to work flawlessly. Last Sunday I did the process on our production
> machine... and testing email2trac I got the following error:
>
> Traceback (most recent call last):
> File "/usr/local/bin/email2trac", line 2948, in <module>
> tktparser.save_email_for_debug(m, settings.project_name)
> File "/usr/local/bin/email2trac", line 620, in save_email_for_debug
> fx.write(('%s' % message).encode())
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1424: ordinal not in range(128)
>
> I had to reverse everything, because I did not find out why that happened... the email2trac version running ist exactly the same as the one on my test device, as is the python version....????????
>
> Any ideas?
>
> Thanks and regards
>
> Frank
>
>
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/546e16a2-85ea-4e21-890c-26d55485c46dn%40googlegroups.com.
Re: email2trac [ In reply to ]
On 2023/07/12 20:31, Frank R. wrote:
> Traceback (most recent call last):
> File "/usr/local/bin/email2trac", line 2948, in <module>
> tktparser.save_email_for_debug(m, settings.project_name)
> File "/usr/local/bin/email2trac", line 620, in save_email_for_debug
> fx.write(('%s' % message).encode())
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1424: ordinal not in range(128)

Try the following patch:

--- email2trac.orig 2023-07-13 07:43:25.588875000 +0900
+++ email2trac 2023-07-13 07:46:07.313533000 +0900
@@ -617,7 +617,10 @@
fx = os.fdopen(fd, 'wb')

self.logger.debug('saving email to %s' %(tmp_file))
- fx.write(('%s' % message).encode())
+ data = '%s' % message
+ if isinstance(data, unicode):
+ data = data.encode('utf-8')
+ fx.write(data)
fx.close()

try:

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/ae1857dd-cbd0-ab1e-8e4a-13f194481eff%40gmail.com.
Re: email2trac [ In reply to ]
Thanks to everyone! I guess I won't be able to go on with your suggestions
before end of August (other projects, vacations).

Have a good time!
Frank

Am Do., 13. Juli 2023 um 00:52 Uhr schrieb Jun Omae <jun66j5@gmail.com>:

> On 2023/07/12 20:31, Frank R. wrote:
> > Traceback (most recent call last):
> > File "/usr/local/bin/email2trac", line 2948, in <module>
> > tktparser.save_email_for_debug(m, settings.project_name)
> > File "/usr/local/bin/email2trac", line 620, in save_email_for_debug
> > fx.write(('%s' % message).encode())
> > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
> 1424: ordinal not in range(128)
>
> Try the following patch:
>
> --- email2trac.orig 2023-07-13 07:43:25.588875000 +0900
> +++ email2trac 2023-07-13 07:46:07.313533000 +0900
> @@ -617,7 +617,10 @@
> fx = os.fdopen(fd, 'wb')
>
> self.logger.debug('saving email to %s' %(tmp_file))
> - fx.write(('%s' % message).encode())
> + data = '%s' % message
> + if isinstance(data, unicode):
> + data = data.encode('utf-8')
> + fx.write(data)
> fx.close()
>
> try:
>
> --
> Jun Omae <jun66j5@gmail.com> (?? ?)
>
> --
> 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+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/ae1857dd-cbd0-ab1e-8e4a-13f194481eff%40gmail.com
> .
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CA%2ByhgXAJB7D3r1RxRos9dnp9gCnebK2DpxPspnGXnHsRodHzBw%40mail.gmail.com.