Bug#934591: Anki fails to start: ModuleNotFoundError: No module named 'PyQt5.sip'
severity 931798 normal thanks On Wed, Aug 21, 2019 at 09:39:52PM +0100, Julian Gilbey wrote: > On Wed, Aug 21, 2019 at 04:22:23PM +0200, Arnaldo Pirrone wrote: > > Hi, i do have python3-sip. > > Now the error is this: > > $ anki > > Traceback (most recent call last): > > File "/usr/bin/anki", line 6, in > > import aqt > > File "/usr/share/anki/aqt/__init__.py", line 32, in > > import aqt.forms > > File "/usr/share/anki/aqt/forms/__init__.py", line 44, in > > from . import about > > File "/usr/share/anki/aqt/forms/about.py", line 42, in > > from aqt.webview import AnkiWebView > > File "/usr/share/anki/aqt/webview.py", line 90, in > > class AnkiWebView(QWebEngineView): > > NameError: name 'QWebEngineView' is not defined > > OK, something is very very wrong with your installation of something, > or some other problem, but I'm quite stumped. Anki imports the whole > of PyQt5.Qt, and that includes QWebEngineView. > > Are you getting the same error message every time you try starting > Anki, or is it different each time? Dear Arnaldo, Since I can't reproduce this problem, and it seems to be related to something else wrong on your system (as it gives different errors on different occasions), I'm reducing the severity of this bug to "normal". If you are able to answer my question, we could try to get to the bottom of this, otherwise we'll just have to leave it, unfortunately. Best wishes, Julian
Bug#934591: Anki fails to start: ModuleNotFoundError: No module named 'PyQt5.sip'
> On Mon, Aug 12, 2019 at 01:13:36PM +0200, Arnaldo Pirrone wrote: > > Package: anki > > Version: 2.1.8+dfsg-1 > > Severity: grave > > > > pyqt5 package is installed > > > > Traceback (most recent call last): > > File "/usr/bin/anki", line 6, in > > import aqt > > File "/usr/share/anki/aqt/__init__.py", line 14, in > > from aqt.qt import * > > File "/usr/share/anki/aqt/qt.py", line 16, in > > from PyQt5.QtWebEngineWidgets import QWebEnginePage > > ModuleNotFoundError: No module named 'PyQt5.sip' > > Dear Arnaldo, > > Thanks for reporting this bug. This is very strange, as I am not able > to reproduce it, and I cannot fathom why it's trying to load > PyQt5.sip; there indeed is no such module, and it shouldn't be > attempting to look for it. Ah, my mistake: on lines 17-20 of /usr/share/anki/aqt/qt.py, it attempts to import PyQt5.sip: try: from PyQt5 import sip except ImportError: import sip But this import is protected by a "try/except" structure, so the ModuleNotFoundError, which is a subclass of ImportError, should have been caught, and the code should have proceeded with "import sip". Hmmm. Julian
Bug#934591: Anki fails to start: ModuleNotFoundError: No module named 'PyQt5.sip'
On Wed, Aug 21, 2019 at 04:22:23PM +0200, Arnaldo Pirrone wrote: > Hi, i do have python3-sip. > Now the error is this: > $ anki > Traceback (most recent call last): > File "/usr/bin/anki", line 6, in > import aqt > File "/usr/share/anki/aqt/__init__.py", line 32, in > import aqt.forms > File "/usr/share/anki/aqt/forms/__init__.py", line 44, in > from . import about > File "/usr/share/anki/aqt/forms/about.py", line 42, in > from aqt.webview import AnkiWebView > File "/usr/share/anki/aqt/webview.py", line 90, in > class AnkiWebView(QWebEngineView): > NameError: name 'QWebEngineView' is not defined OK, something is very very wrong with your installation of something, or some other problem, but I'm quite stumped. Anki imports the whole of PyQt5.Qt, and that includes QWebEngineView. Are you getting the same error message every time you try starting Anki, or is it different each time? Best wishes, Julian
Bug#934591: Anki fails to start: ModuleNotFoundError: No module named 'PyQt5.sip'
Hi, i do have python3-sip. Now the error is this: $ anki Traceback (most recent call last): File "/usr/bin/anki", line 6, in import aqt File "/usr/share/anki/aqt/__init__.py", line 32, in import aqt.forms File "/usr/share/anki/aqt/forms/__init__.py", line 44, in from . import about File "/usr/share/anki/aqt/forms/about.py", line 42, in from aqt.webview import AnkiWebView File "/usr/share/anki/aqt/webview.py", line 90, in class AnkiWebView(QWebEngineView): NameError: name 'QWebEngineView' is not defined Il giorno mar 20 ago 2019 alle ore 09:06 Julian Gilbey ha scritto: > tags 934591 + unreproducible moreinfo > thanks > > On Mon, Aug 12, 2019 at 01:13:36PM +0200, Arnaldo Pirrone wrote: > > Package: anki > > Version: 2.1.8+dfsg-1 > > Severity: grave > > > > pyqt5 package is installed > > > > Traceback (most recent call last): > > File "/usr/bin/anki", line 6, in > > import aqt > > File "/usr/share/anki/aqt/__init__.py", line 14, in > > from aqt.qt import * > > File "/usr/share/anki/aqt/qt.py", line 16, in > > from PyQt5.QtWebEngineWidgets import QWebEnginePage > > ModuleNotFoundError: No module named 'PyQt5.sip' > > Dear Arnaldo, > > Thanks for reporting this bug. This is very strange, as I am not able > to reproduce it, and I cannot fathom why it's trying to load > PyQt5.sip; there indeed is no such module, and it shouldn't be > attempting to look for it. > > Question: do you have the python3-sip package installed? (It fulfils > a dependency of python3-pyqt5, so you should do.) > > Best wishes, > >Julian >
Bug#934591: Anki fails to start: ModuleNotFoundError: No module named 'PyQt5.sip'
tags 934591 + unreproducible moreinfo thanks On Mon, Aug 12, 2019 at 01:13:36PM +0200, Arnaldo Pirrone wrote: > Package: anki > Version: 2.1.8+dfsg-1 > Severity: grave > > pyqt5 package is installed > > Traceback (most recent call last): > File "/usr/bin/anki", line 6, in > import aqt > File "/usr/share/anki/aqt/__init__.py", line 14, in > from aqt.qt import * > File "/usr/share/anki/aqt/qt.py", line 16, in > from PyQt5.QtWebEngineWidgets import QWebEnginePage > ModuleNotFoundError: No module named 'PyQt5.sip' Dear Arnaldo, Thanks for reporting this bug. This is very strange, as I am not able to reproduce it, and I cannot fathom why it's trying to load PyQt5.sip; there indeed is no such module, and it shouldn't be attempting to look for it. Question: do you have the python3-sip package installed? (It fulfils a dependency of python3-pyqt5, so you should do.) Best wishes, Julian
Bug#934591: Anki fails to start: ModuleNotFoundError: No module named 'PyQt5.sip'
Package: anki Version: 2.1.8+dfsg-1 Severity: grave pyqt5 package is installed Traceback (most recent call last): File "/usr/bin/anki", line 6, in import aqt File "/usr/share/anki/aqt/__init__.py", line 14, in from aqt.qt import * File "/usr/share/anki/aqt/qt.py", line 16, in from PyQt5.QtWebEngineWidgets import QWebEnginePage ModuleNotFoundError: No module named 'PyQt5.sip' -- System Information: Debian Release: bullseye/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.2.0-8.1-liquorix-amd64 (SMP w/4 CPU cores; PREEMPT) Kernel taint flags: TAINT_OOT_MODULE Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE=it_IT.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages anki depends on: ii libjs-jquery3.3.1~dfsg-3 ii libjs-jquery-flot 0.8.3+dfsg-1 ii libjs-jquery-ui 1.12.1+dfsg-5 ii libjs-mathjax 2.7.4+dfsg-1 ii libqt5core5a5.11.3+dfsg1-2+b1 ii python3 3.7.3-1 ii python3-bs4 4.8.0-1 ii python3-decorator 4.3.0-1.1 ii python3-distutils 3.7.4-3 ii python3-markdown3.1.1-2 ii python3-pyaudio 0.2.11-1+b2 ii python3-pyqt5 5.11.3+dfsg-1+b3 ii python3-pyqt5.qtwebchannel 5.11.3+dfsg-1+b3 ii python3-pyqt5.qtwebengine 5.11.3+dfsg-1+b3 ii python3-requests2.21.0-1 ii python3-send2trash 1.5.0-1 Versions of packages anki recommends: ii python3-matplotlib 3.0.2-2 Versions of packages anki suggests: pn dvipng pn lame ii mplayer 2:1.3.0-8+b4 -- no debconf information