Skip to content

Commit 067330d

Browse files
committed
Encode to UTF-8 in pprint
The encoding (or the lack of) was causing issues with the pretty print function of scholarly in Windows machines. This is one of the errors reported in #413.
1 parent 23caf89 commit 067330d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scholarly/_scholarly.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ def pprint(self, object: Author or Publication)->None:
434434
del publication['container_type']
435435

436436
del to_print['container_type']
437-
print(pprint.pformat(to_print))
437+
print(pprint.pformat(to_print).encode("utf-8"))
438438

439439
def search_org(self, name: str, fromauthor: bool = False) -> list:
440440
"""

0 commit comments

Comments
 (0)