diff --git a/src/calibre/gui2/viewer/web_view.py b/src/calibre/gui2/viewer/web_view.py index febf98dd3d..c54e7cd376 100644 --- a/src/calibre/gui2/viewer/web_view.py +++ b/src/calibre/gui2/viewer/web_view.py @@ -167,7 +167,7 @@ class UrlSchemeHandler(QWebEngineUrlSchemeHandler): import json from calibre.srv.books import get_mathjax_manifest self.mathjax_manifest = json.dumps(get_mathjax_manifest()['files']) - send_reply(rq, 'application/json', self.mathjax_manifest) + send_reply(rq, 'application/json', as_bytes(self.mathjax_manifest)) return path = os.path.abspath(os.path.join(self.mathjax_dir, '..', name)) if path.startswith(self.mathjax_dir):