From 09f46e75882d38383b93ba969d3c3dc2c1d4d429 Mon Sep 17 00:00:00 2001 From: Niklas Baumstark Date: Tue, 22 Oct 2019 10:17:43 +0200 Subject: [PATCH] Fix "invalid escape sequence" SyntaxError This happens when the library is used with `-Werror`, since `\c` is not a valid Python escape sequence. --- PyPDF2/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyPDF2/generic.py b/PyPDF2/generic.py index 959957dde..c92774e2e 100644 --- a/PyPDF2/generic.py +++ b/PyPDF2/generic.py @@ -345,7 +345,7 @@ def readStringFromStream(stream): b_("t") : b_("\t"), b_("b") : b_("\b"), b_("f") : b_("\f"), - b_("c") : b_("\c"), + b_("c") : b_(r"\c"), b_("(") : b_("("), b_(")") : b_(")"), b_("/") : b_("/"),