On 10/28/18 12:03 PM, Guiseppin Thomas wrote:
Hi,
I imported some mbox archives in Hyperkitty.
I have lot issues like:
/\Failed adding message <5b0900ab.1c69fb81.70ab.2f87@mx.google.com>: ('Non-ascii sender address', <email.message.EmailMessage object at 0x7f05f1606048>)// //Non-ascii sender address from "Stéphane blipblop <stlablipblop at gmail.com>" about [HATLAB][It] Re: A débarrasser ! /
It's probably because "Stéphane".
The 'Non-ascii sender address' message comes from
try: from_str = header_to_unicode(message['From']) from_name, from_email = parseaddr(from_str) from_name = from_name.strip() sender_address = from_email.encode('ascii').decode("ascii").strip() except (UnicodeDecodeError, UnicodeEncodeError): raise ValueError("Non-ascii sender address", message)
Possibly the exception is thrown in parseaddr(), but much more likely, the email address, not the display name contains non-ascii.
Some advise to fix it ?
All the other messages should have been imported. If you can find and fix the 'bad' ones in the mbox, you can make a new mbox with just those and import that. You could also import the entire mbox with fixed messages. The already added ones won't be re-imported because of duplicate Message-ID:, but it's extra processing.
If the actual bad message From: header is
From: Stéphane blipblop <stlablipblop@gmail.com>
or
From: Stéphane blipblop <stlablipblop at gmail.com>
That shouldn't cause the error, so I'g guessing that 'blipblop' is not the actual value and the actual value in <stlablipblop at gmail.com> has non-ascii.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan