jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/866796 )
Change subject: category_graph: add encoding ......................................................................
category_graph: add encoding
Change-Id: Ifda3512acaff021ce6f47f440d4b8ddd28c3966c --- M scripts/category_graph.py 1 file changed, 13 insertions(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/category_graph.py b/scripts/category_graph.py index d757a6d..d871225 100755 --- a/scripts/category_graph.py +++ b/scripts/category_graph.py @@ -163,10 +163,10 @@ break n = self.rev[n][0] pywikibot.output('Saving results') - pywikibot.output(self.to + '.dot') - self.dot.write(self.to + '.dot') + pywikibot.output(self.to + '.gv') + self.dot.write(self.to + '.gv', encoding='utf-8') pywikibot.output(self.to + '.svg') - self.dot.write_svg(self.to + '.svg') + self.dot.write_svg(self.to + '.svg', encoding='utf-8') pywikibot.output(self.to + '.html') header = ('<head><meta charset="UTF-8"/>' '<title>' + self.cat.title(with_ns=False) @@ -181,7 +181,7 @@ '<style> svg { height:100%; width:100%; } </style>\n') with io.open(self.to + '.html', mode='wb') as o: o.write(header.encode()) - o.write(self.dot.create('dot', 'svg')) + o.write(self.dot.create('dot', 'svg', encoding='utf-8'))
if __name__ == '__main__':