0

I used the pyqt5 code with QtWebEngine from https://stackoverflow.com/a/48053017/17089139 to show a PDF file within my desktop application. It worked fine for several months now. After an update of pdf.js to 2.11.338-1 (from archlinux-repo) I get the following error in my pycharm-console:

js: Uncaught SyntaxError: Unexpected token '='

The application starts, but no PDF is shown. Where/How to debug this error?

  • Python: 3.9
  • PyQt5: 5.15.2
  • PyQtWebEngine: 5.15.2

Edit: Problem seems to be result of unstable (2.11.338) PDF.js - Usage of stable (2.10.377) removes the error and PDF is shown. Thanks to @eyllanesc for the hint.

martin222
  • 1
  • 1
  • The version you are pointing to is in beta, why do you risk unstable versions? – eyllanesc Oct 06 '21 at 12:57
  • Good hint. I'll try stable ASAP and post results. – martin222 Oct 06 '21 at 13:07
  • The [archlinux pdfjs-2.11.338-1 package](https://archlinux.org/packages/community/any/pdfjs/) is not in testing and works just fine for me. Your other packages look out of date, though, so maybe you need to fully update your system properly. That's assuming you're using the official arclinuxh qt/pyqt packages, of course. And have you tried testing in a normal console instead of pycharm? – ekhumoro Oct 06 '21 at 14:04

0 Answers0