Migrating to 3 - IsADirectoryError during hyperkitty_import
I tried to import an mbox using the command:
sudo ./manage.py hyperkitty_import -l korus@lists.xxx.hu /var/lib/mailman/archives/private/korus.mbox
I got the error message below, even if korus.mbox is a normal file (1.4GB large though). How can I import it without error?
Importing from mbox file /var/lib/mailman/archives/private/korus.mbox to korus@lists.xxx.hu Traceback (most recent call last): File "/usr/share/mailman3-web/./manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 381, in execute_from_command_line utility.execute() File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 323, in run_from_argv self.execute(*args, **cmd_options) File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 364, in execute output = self.handle(*args, **options) File "/usr/lib/python3/dist-packages/hyperkitty/management/commands/hyperkitty_import.py", line 355, in handle importer.from_mbox(mbfile, report_name) File "/usr/lib/python3/dist-packages/hyperkitty/management/commands/hyperkitty_import.py", line 149, in from_mbox mbox = mailbox.mbox(mbfile) File "/usr/lib/python3.9/mailbox.py", line 850, in __init__ _mboxMMDF.__init__(self, path, factory, create) File "/usr/lib/python3.9/mailbox.py", line 584, in __init__ f = open(self._path, 'rb+') IsADirectoryError: [Errno 21] Is a directory: '/var/lib/mailman/archives/private/korus.mbox'
Sorry. my bad.
$ sudo ls -lh '/var/lib/mailman/archives/private/korus.mbox' gave me -rw-r--r-- 1 list list 1,4G dec 21 23.17 korus.mbox
but this is /var/lib/mailman/archives/private/korus.mbox/korus.mbox
feel free to delete the thread.
On 12/28/21 10:42 AM, horvath.arpad.szfvar@gmail.com wrote:
I tried to import an mbox using the command:
sudo ./manage.py hyperkitty_import -l korus@lists.xxx.hu /var/lib/mailman/archives/private/korus.mbox ... IsADirectoryError: [Errno 21] Is a directory: '/var/lib/mailman/archives/private/korus.mbox'
The correct path is /var/lib/mailman/archives/private/korus.mbox/korus.mbox
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
horvath.arpad.szfvar@gmail.com
-
Mark Sapiro