Skip to content

Commit a19cf1e

Browse files
authored
Update docs (#911)
1 parent 3b412c5 commit a19cf1e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

chess/pgn.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,6 +1470,10 @@ def read_game(handle: TextIO, *, Visitor: Any = GameBuilder) -> Any:
14701470
14711471
>>> pgn = open("data/pgn/kasparov-deep-blue-1997.pgn", encoding="utf-8")
14721472
1473+
If you get a UnicodeDecodeError, including the following parameters might help:
1474+
1475+
>>> pgn = open("data/pgn/kasparov-deep-blue-1997.pgn", 'r', errors='replace')
1476+
14731477
Use :class:`~io.StringIO` to parse games from a string.
14741478
14751479
>>> import io

0 commit comments

Comments
 (0)