Skip to content

Context vars LookupError when calling unarchive_from_data (multiline string method) #4

Description

@nadiabey
File "/usr/local/lib/python3.9/site-packages/typedstream/advanced_repr.py", line 137, in __str__
    return "\n".join(self._as_multiline_string_())
  File "/usr/local/lib/python3.9/site-packages/typedstream/advanced_repr.py", line 119, in _as_multiline_string_
    if id(self) in _currently_rendering_ids.get()[:-1]: # last element of _currently_rendering_ids is always id(self)
LookupError: <ContextVar name='_currently_rendering_ids' at 0x1123ea040>

I called typestream.unarchive_from_data on a "attributedBody" string from a MacOS messages .db file. The above error is thrown. I'm unfamiliar with context variables so the fix could be very simple, but I'm unsure where to begin. Working in Python 3.9.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions