Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header error writing EML derivatives #154

Open
gwiedeman opened this issue Apr 29, 2022 · 2 comments
Open

Header error writing EML derivatives #154

gwiedeman opened this issue Apr 29, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@gwiedeman
Copy link
Collaborator

Describe the bug
Got his for a minority of messages writing to EML. I believe it was from a PST source. Should be a common header key so it needs to be looked at more. Might need to normalize the encoding strings that are coming out of PSTs now per #150.

Traceback (most recent call last):
  File "F:\Projects\mailbag\mailbag\derivatives\eml.py", line 119, in do_task_per_message
    gen.flatten(msg)
  File "c:\users\greg\appdata\local\programs\python\python37-32\lib\email\generator.py", line 116, in flatten
    self._write(msg)
  File "c:\users\greg\appdata\local\programs\python\python37-32\lib\email\generator.py", line 181, in _write
    self._dispatch(msg)
  File "c:\users\greg\appdata\local\programs\python\python37-32\lib\email\generator.py", line 214, in _dispatch
    meth(msg)
  File "c:\users\greg\appdata\local\programs\python\python37-32\lib\email\generator.py", line 272, in _handle_multipart
    g.flatten(part, unixfrom=False, linesep=self._NL)
  File "c:\users\greg\appdata\local\programs\python\python37-32\lib\email\generator.py", line 116, in flatten
    self._write(msg)
  File "c:\users\greg\appdata\local\programs\python\python37-32\lib\email\generator.py", line 181, in _write
    self._dispatch(msg)
  File "c:\users\greg\appdata\local\programs\python\python37-32\lib\email\generator.py", line 214, in _dispatch
    meth(msg)
  File "c:\users\greg\appdata\local\programs\python\python37-32\lib\email\generator.py", line 272, in _handle_multipart
    g.flatten(part, unixfrom=False, linesep=self._NL)
  File "c:\users\greg\appdata\local\programs\python\python37-32\lib\email\generator.py", line 116, in flatten
    self._write(msg)
  File "c:\users\greg\appdata\local\programs\python\python37-32\lib\email\generator.py", line 189, in _write
    msg.replace_header('content-transfer-encoding', munge_cte[0])
  File "c:\users\greg\appdata\local\programs\python\python37-32\lib\email\message.py", line 558, in replace_header
    raise KeyError(_name)
KeyError: 'content-transfer-encoding'

@gwiedeman gwiedeman added the bug Something isn't working label Apr 29, 2022
@gwiedeman gwiedeman added this to the MVP milestone Apr 29, 2022
@gwiedeman
Copy link
Collaborator Author

Haven't been able to recreate this unfortunately. Not sure if it got fixed or if I didn't document it right.

@gwiedeman
Copy link
Collaborator Author

Confirmed by a user that this issue is still present, but I can't recreate it with our sample data, so I guess its going in the MVP release. ¯_(ツ)_/¯

@gwiedeman gwiedeman removed this from the MVP milestone Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

1 participant