This traceback
Traceback (most recent call last):
File "main.py", line 3, in <module>
print(add(1, "two"))
^^^^^^^^^^^^^
File "add.py", line 2, in add
return a + b
~~^~~
TypeError: unsupported operand type(s) for +: 'int' and 'str'
as an example includes anchors (the lines with "~" and "^"). In a separate PR, ability to parse tracebacks with these was added, but information about column number is not stored in the ParsedException object in order to reconstruct this.
To maintain the property that ParsedException.from_string(text).to_string() == text, it will be necessary to add an attribute to the ParsedException class, and the logic in both from_string for parsing and to_string for reconstruction.