0

I am using anytree package for creating tree.

udo = Node("Udo")
marc = Node("Marc", parent=udo)
print(RenderTree(udo))

While using RenderTree function, I am getting unicode error as below:

Traceback (most recent call last): File "C:\Users\Neelakshi\workspace\LogisticRegression\TypeHierarchyTest.py", line 16, in print(RenderTree(udo)) File "C:\Miniconda3\envs\Python35\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 14-16: character maps to

I have seen similar threads for this issue but could not find solution for it. I am running this sample program from eclipse and not from command line. Following are package details :

python: 3.5.1
conda: 4.3.24

1 Answer 1

0

I resolved this issue by changing Eclipse encoding settings to Utf-8. It was cp1252 before.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.