Closed scharc closed 4 years ago
Which version of PonyMail? Can you provide a simple test case?
We are testing ponymail 0.11 with Debian Jessi in a proxmox lxc container.
I can not provide a test case to the public. For debugging I could give a sample to a developer. Please contact me at scharc (at) gmail (dot) com
I have just noticed that the line numbers don't quite agree.
The stack trace says:
File "/var/www/ponymail/tools/archiver.py", line 102, in parse_attachment print("Found attachment: %s" % filename)
Howver the print statement is at line 101 in the code: https://github.com/apache/incubator-ponymail/blob/8b00e7c8eabf01a68fc119d2ce58bfbfc3c3eea3/tools/archiver.py#L101
This is a bit odd if you are using version 0.11 (or indeed the trunk version, as that is the same). It would be worth commenting out the print statement to see if that avoids the failure or if it fails elsewhere.
Note: I have been sent sample data, but cannot get it to fail, so it is looking like an issue with your installation.
The wrong line numbers was my fault. I wrote a comment there, to remeber that it broke there.
After commenting out the print statement the import went through!
I have not been able to cause the error on my system, and AFAIK no-one else has seen the same issue.
Since it only affects the print statement, I wonder if it could be caused by the terminal encoding setting?
Try running the following code using python3:
print("\xfc")
It should print a lower-case u with umlaut.
Could also try replacing the print statement with the following:
print("Found attachment: %s" % filename.encode('ascii','xmlcharrefreplace').decode('ascii'))
This should allow the name to be printed on an ASCII terminal. Non-ASCII characters such as u-umlaut will be converted to the form: 'ü'
Not a PonyMail bug
when importing mbox file with attachments it breaks with the following error: