Open yarikoptic opened 7 years ago
Thanks for posting! What should be done better than what was done in the linked PR #598 ?
I think so
Thank you, now I understand. I was assuming that NotASurrogateError
was already a derivative of UnicodeError.
In any case, creating such an exception should be a piece of cake, right?
I guess so... and would appreciate a quick fix up -- ran into the same problem in a different scenario now :-(
I think this should be implemented by someone who can reproduce the issue. Creating a UnicodeDecodeError
with its 5 arguments shouldn't be impossible.
Originally discovered/reported in #598 (fixing somewhat the situation but not really).
as you can see -- there is no import of
git
anywhere in the stack (was imported some time before) and thesurrogateescape_handler
kicks in, and then fails in a "non standard way". If it does provide some custom handling, IMHO whatever exception it could ever throw should be a subclass of possibly expected "upstairs"UnicodeEncodeError
. Here is a bit more detail from the stack