From 14cb2bba8362184a50c8e7feeed96216d5f5fe62 Mon Sep 17 00:00:00 2001 From: Stratos Gerakakis Date: Mon, 1 Apr 2019 00:21:59 +0200 Subject: [PATCH] Prevent a TypeError Exception Under my Python 3.6.6 env I get a: ``` TypeError: must be str, not bytes ``` without this fix. --- sphinxcontrib/plantuml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sphinxcontrib/plantuml.py b/sphinxcontrib/plantuml.py index 1a818e3..dd020e9 100644 --- a/sphinxcontrib/plantuml.py +++ b/sphinxcontrib/plantuml.py @@ -376,7 +376,8 @@ def _convert_eps_to_pdf(self, refname, fname): try: try: p = subprocess.Popen(args, stdout=subprocess.PIPE, - stderr=subprocess.PIPE) + stderr=subprocess.PIPE, + encoding='utf-8') except OSError as err: # workaround for missing shebang of epstopdf script if err.errno != getattr(errno, 'ENOEXEC', 0):