On 7/7/20 7:42 PM, Mark Dadgar wrote:
This is actually an mbox file generated by mailman3.
(venv) mailman@mail:/opt/mailman/mm$ /opt/mailman/mm/bin/django-admin hyperkitty_import --since 2020-02-19 -l trackjunkies@pdc-racing.net /temp/archive/trackjunkies-new-1.mbox Importing from mbox file /temp/archive/trackjunkies-new-1.mbox to trackjunkies@pdc-racing.net \Traceback (most recent call last): File "/opt/mailman/mm/venv/bin/django-admin", line 8, in <module> sys.exit(execute_from_command_line()) File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line utility.execute() File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/core/management/base.py", line 323, in run_from_argv self.execute(*args, **cmd_options) File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/core/management/base.py", line 364, in execute output = self.handle(*args, **options) File "/opt/mailman/mm/venv/lib/python3.8/site-packages/hyperkitty/management/commands/hyperkitty_import.py", line 327, in handle importer.from_mbox(mbfile) File "/opt/mailman/mm/venv/lib/python3.8/site-packages/hyperkitty/management/commands/hyperkitty_import.py", line 152, in from_mbox for msg in mbox: File "/usr/lib/python3.8/mailbox.py", line 109, in itervalues value = self[key] File "/usr/lib/python3.8/mailbox.py", line 73, in __getitem__ return self.get_message(key) File "/usr/lib/python3.8/mailbox.py", line 781, in get_message msg.set_from(from_line[5:].decode('ascii')) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 27: ordinal not in range(128)
mailman 3.3.1 / core 3.1
Easy fix? I’m missing about 10 days' worth of archives as a result of this.
There is a message in your mbox file with a '^From ' separator with non-ascii in the remainder of the line.
This may be an unescaped '^From ' in a message body or an actual '^From ' separator.
First get your mbox and find the last message successfully imported in the archive before this one. You can delete everything up to through that one. Then you can fix the bad message or just delete it from the remaining mbox and run hyperkitty_import start=... with this mbox.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan