> 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 <module>
> >     import aqt
> >   File "/usr/share/anki/aqt/__init__.py", line 14, in <module>
> >     from aqt.qt import *
> >   File "/usr/share/anki/aqt/qt.py", line 16, in <module>
> >     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

Reply via email to