Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 641966 - app-misc/anki-2.1.0_beta25 missing qtwebengine and other issues
Summary: app-misc/anki-2.1.0_beta25 missing qtwebengine and other issues
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: qtwebkit-removal
  Show dependency tree
 
Reported: 2017-12-21 19:27 UTC by Dennis Nezic
Modified: 2020-02-16 22:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
anki 2.1.13 patch - webengine jsonschema (anki-2.1.13.patch,731 bytes, patch)
2019-07-14 13:20 UTC, Samuel Bauer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Nezic 2017-12-21 19:27:58 UTC
I'm pretty sure the new 2.1 version depends on qtwebengine, not qtwebkit. So the PyQt5 use flags need to be modified, to something like:

  dev-python/PyQt5 gui svg webengine network widgets printsupport webchannel

After getting PyQt5 and the massive qtwebengine installed with the above flags, anki still fails to start with the following python error message:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/aqt/__init__.py", line 230, in run
    _run()
  File "/usr/lib64/python3.6/site-packages/aqt/__init__.py", line 298, in _run
    import aqt.main
  File "/usr/lib64/python3.6/site-packages/aqt/main.py", line 24, in <module>
    import aqt.mediasrv
  File "/usr/lib64/python3.6/site-packages/aqt/mediasrv.py", line 26, in <module>
    _exportFolder = _getExportFolder()
  File "/usr/lib64/python3.6/site-packages/aqt/mediasrv.py", line 24, in _getExportFolder
    raise Exception("couldn't find web folder")
Exception: couldn't find web folder

So I hacked mediasrv.py to use a hardcoded folder, and that finally got anki to start. But, although I was able to load my old deck, and export it, I wasn't able to view the cards, with errors such as:

Anki 2.1.0beta25 Python 3.6.3 Qt 5.9.3 PyQt 5.9.2
Platform: Linux
Flags: frz=False ao=False
Caught exception:
  File "/usr/lib64/python3.6/site-packages/aqt/webview.py", line 296, in _onHeight
    height = math.ceil(qvar*self.zoomFactor())
<class 'TypeError'>: unsupported operand type(s) for *: 'NoneType' and 'int'
Caught exception:
  File "/usr/lib64/python3.6/site-packages/aqt/webview.py", line 296, in _onHeight
    height = math.ceil(qvar*self.zoomFactor())
<class 'TypeError'>: unsupported operand type(s) for *: 'NoneType' and 'int'

Anki 2.1.0beta25 Python 3.6.3 Qt 5.9.3 PyQt 5.9.2
Platform: Linux
Flags: frz=False ao=False
Caught exception:
  File "/usr/lib64/python3.6/site-packages/aqt/webview.py", line 296, in _onHeight
    height = math.ceil(qvar*self.zoomFactor())
<class 'TypeError'>: unsupported operand type(s) for *: 'NoneType' and 'int'

This app/ebuild is definitely not ready for public release.
Comment 1 Gleb 2017-12-26 17:17:55 UTC
I also get this error message which suggests that pyaudio/portaudio are both required:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/anki", line 6, in <module>                                                 
    import aqt                                                                                                      
  File "/usr/lib64/python3.6/site-packages/aqt/__init__.py", line 4, in <module>
    from anki import version as _version                                           
  File "/usr/lib64/python3.6/site-packages/anki/__init__.py", line 14, in <module>
    from anki.storage import Collection
  File "/usr/lib64/python3.6/site-packages/anki/storage.py", line 11, in <module>                     
    from anki.collection import _Collection                                  
  File "/usr/lib64/python3.6/site-packages/anki/collection.py", line 26, in <module>
    from anki.sound import stripSounds
  File "/usr/lib64/python3.6/site-packages/anki/sound.py", line 261, in <module>
    import pyaudio
ModuleNotFoundError: No module named 'pyaudio'
Comment 2 Hector Martin 2018-02-15 14:30:35 UTC
I opened a PR for the webengine part of this issue: https://github.com/gentoo/gentoo/pull/7127
Comment 3 Larry the Git Cow gentoo-dev 2018-03-01 12:55:25 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=382eed81673cfd58b185b662a3f7ccc6816765f6

commit 382eed81673cfd58b185b662a3f7ccc6816765f6
Author:     Hector Martin <marcan@marcan.st>
AuthorDate: 2018-02-08 18:32:33 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2018-03-01 12:54:52 +0000

    app-misc/anki: depends on dev-python/PyQt5[webengine,widgets]
    
    Bug: https://bugs.gentoo.org/641966
    Package-Manager: Portage-2.3.24, Repoman-2.3.6
    Closes: https://github.com/gentoo/gentoo/pull/7127

 app-misc/anki/anki-2.1.0_beta27.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)}
Comment 4 Samuel Bauer 2019-07-14 13:20:34 UTC
Created attachment 582848 [details, diff]
anki 2.1.13 patch - webengine jsonschema

New release of dev-python/PyQt5 seen the webengine component splitted to dev-python/PyQtWebEngine.
This patch fixes the way anki ebuild depends on PyQtWebEngine.

Seems there was also a missing dependency on dev-python/jsonschema, which is also included
Comment 5 anonymous 2019-07-14 14:56:18 UTC
app-misc/anki-2.1.14::crocket-overlay works without dev-python/PyQtWebEngine which is not installed on my system.
Comment 6 Samuel Bauer 2019-07-29 01:54:34 UTC
(In reply to crocket from comment #5)
> app-misc/anki-2.1.14::crocket-overlay works without dev-python/PyQtWebEngine
> which is not installed on my system.

If you stick =dev-python/PyQt5-5.10.1-r1, you can, but If you install latest versions, the package has been splitted. There is no more webengine flag in latest PyQt5.
Target dependency is qtwebengine, package providing python bindings is now PyQtWebEngine. 

The attached patch should exclude =dev-python/PyQt5-5.10.1-r1, I assume dev-python/PyQtWebEngine requires >=dev-python/PyQt5-5.12.
The version in your overlay as well as gentoo repository forces to stick to =dev-python/PyQt5-5.10.1-r1 as it is the last version exposing webengine flag.
Comment 7 Larry the Git Cow gentoo-dev 2020-02-16 22:13:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=936b4104874bb166a30785aa8e3b145c7a0d4508

commit 936b4104874bb166a30785aa8e3b145c7a0d4508
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2020-02-16 22:12:21 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-02-16 22:13:17 +0000

    app-misc/anki: Drop 2.1.0_beta25 with wrong dependency on qtwebkit
    
    No keywords anyway, whereas newer versions are keyworded.
    
    Closes: https://bugs.gentoo.org/641966
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 app-misc/anki/Manifest                 |  1 -
 app-misc/anki/anki-2.1.0_beta25.ebuild | 93 ----------------------------------
 2 files changed, 94 deletions(-)