Skip to content

Commit

Permalink
Update tree.py (#215)
Browse files Browse the repository at this point in the history
Line 932 gives this error "UnicodeEncodeError: 'charmap' codec can't encode characters in position 20-22: character maps to <undefined>" , solved it using the encode function.
  • Loading branch information
savioratharv committed Aug 18, 2023
1 parent f9fba2c commit 8cd2940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion treelib/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ def write(line):
print("Tree is empty")

if stdout:
print(self._reader)
print(self._reader.encode('utf-8'))
else:
return self._reader

Expand Down

0 comments on commit 8cd2940

Please sign in to comment.