You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix by wagnerscastle: panyanyany#30
Fork with the fix here: https://github.com/DeleteMetaInf/beeprint
Tested it, and it works. No longer causes a UnicodeDecodeError when trying to print a malformed Unicode string or a JSON stringified Python dict.
pp() will fail with malformed unicode strings that the default pprint library works fine with. At least on python3.
To fix this, replace
seg_list = [seg.decode('utf8') for seg in seg_list]
with
seg_list = [seg.decode('utf8','backslashreplace') for seg in seg_list]
To reproduce:
After patch:
Of note is that a dict.key is printed just fine. For example (without the patch):
The text was updated successfully, but these errors were encountered: