Skip to content

Commit 65e041b

Browse files
committed
Add note about UnicodeDecodeError
1 parent 209af99 commit 65e041b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ch13-interact-with-pdf-files/1-work-with-the-contents-of-a-pdf-file.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
text = input_file.getPage(page_num).extractText()
2929
output_file.write(text)
3030

31+
# NOTE: On some machines, you may get a UnicodeDecodeError when
32+
# writing the file. To fix this, replace line 25 with the following:
33+
# with open(output_file_path, "w", encoding="utf-8")
3134

3235
# Exercise 3
3336
# Save file without cover page

0 commit comments

Comments
 (0)