Skip to content

Fix: Exception when printing models with Unicode characters #36#1

Open
jscarpaciCB wants to merge 1 commit into
masterfrom
jscarpaciCB-patch-1
Open

Fix: Exception when printing models with Unicode characters #36#1
jscarpaciCB wants to merge 1 commit into
masterfrom
jscarpaciCB-patch-1

Conversation

@jscarpaciCB
Copy link
Copy Markdown
Owner

Used codecs to fix issue with printing of characters such as below:

AB8B7D5E808226F8E4279F6A779DCF2D

Size (bytes) : 878784
Signature Status : True
Traceback (most recent call last):
File "C:\Users\jscarpaci\PycharmProjects\untitled\binary_search.py", line 38,
in
sys.exit(main())
File "C:\Users\jscarpaci\PycharmProjects\untitled\binary_search.py", line 26,
in main
print("%-20s : %s" % ('Product Name', binary.product_name))
File "C:\Python27\lib\encodings\cp437.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\xae' in position 2
8: character maps to

…ck#36

Used codecs to fix issue with printing of characters such as below:

AB8B7D5E808226F8E4279F6A779DCF2D
--------------------------------------------------------------------------------

Size (bytes)         : 878784
Signature Status     : True
Traceback (most recent call last):
  File "C:\Users\jscarpaci\PycharmProjects\untitled\binary_search.py", line 38,
in <module>
    sys.exit(main())
  File "C:\Users\jscarpaci\PycharmProjects\untitled\binary_search.py", line 26,
in main
    print("%-20s : %s" % ('Product Name', binary.product_name))
  File "C:\Python27\lib\encodings\cp437.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\xae' in position 2
8: character maps to <undefined>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant