Exporting emails with attachments fails when saved to disk

When email attachments are saved to a path instead of database, exporting the mailbox raises and exception and skips the actual content of the attachment.

  File "/opt/mailman/mm/venv/lib/python3.7/site-packages/HyperKitty-1.3.0-py3.7.egg/hyperkitty/views/mlist.py", line 327, in stream_mbox
    msg = email.as_message()
  File "/opt/mailman/mm/venv/lib/python3.7/site-packages/HyperKitty-1.3.0-py3.7.egg/hyperkitty/models/email.py", line 188, in as_message
    subtype=mimetype[1], filename=attachment.name)
  File "/usr/lib/python3.7/email/message.py", line 1147, in add_attachment
    self._add_multipart('mixed', *args, _disp='attachment', **kw)
  File "/usr/lib/python3.7/email/message.py", line 1135, in _add_multipart
    part.set_content(*args, **kw)
  File "/usr/lib/python3.7/email/message.py", line 1162, in set_content
    super().set_content(*args, **kw)
  File "/usr/lib/python3.7/email/message.py", line 1092, in set_content
    content_manager.set_content(self, *args, **kw)
  File "/usr/lib/python3.7/email/contentmanager.py", line 35, in set_content
    handler = self._find_set_handler(msg, obj)
  File "/usr/lib/python3.7/email/contentmanager.py", line 58, in _find_set_handler
    raise KeyError(full_path_for_error)