Anki Forums

New toolkit and packaging test (round 2)

All platforms

Separate qt5 and qt6 downloads are provided. The qt6 downloads use the new toolkit first introduced in the previous test.

Since the previous test, some compatibility shims have been added to the Qt6 builds by @glutanimate, which should improve add-on compatibility. Please let us know how they go for you.

The qt5 builds use Anki’s latest code, but with older toolkit versions like in previous Anki releases. They may be useful for comparison, and there may be some add-ons that work with them but do not work with the the qt6 version (please let us know).

As this is a snapshot of the current development code, it also includes other interface changes such as the editor work Henrik has been doing.

Please let us know of any regressions / improvements you notice.

macOS

  • There is now a native build for Apple Silicon. It currently does not support recording, and the audio playback still uses Intel binaries, so you will still need Rosetta installed.

  • The Qt6 x86 build requires macOS 10.14

  • The Qt5 x86 build requires macOS 10.13.4

Linux

  • The Linux builds need zstd to decompress, eg:
sudo apt install zstd
tar -axf anki-2.1.50-linux-qt6.tar.zstd
  • A wheel is now provided for ARM64 Linux, and requires glibc 2.31 or greater. A packaged version is not currently possible.

  • The x86 builds require glibc 2.27 or later.

Windows

  • The installer requires you to be on Windows 10 or 11. Windows 8 may possibly work (perhaps only for the qt5 build), but you’d need to manually copy the files from another machine.

Download

https://apps.ankiweb.net/downloads/beta/pkg-test-2/?C=N&O=A

3 Likes

Add-on buttons in the editor disappeared in both the qt5 and qt6 builds. This is also reproducible in the latest development code. Tested on Windows.

1 Like

Table headers once more: It looks like sorting can be switched from ascending to descending, but not the other way around.

1 Like

@dae is there a way to test this while on Mac OS Monterey? I get this error:
PermissionError: [Errno 13] Permission denied: '/Applications/Anki 50 qt6.app/Contents/MacOS/audio'

That’s probably a byproduct of the editor work @hengiesel’s been doing, and hopefully we’ll have better compatibility or a migration guide once we reach alpha/beta builds.

Thanks, fixed in dev.

The Mac builds were completely broken by a fix I applied for Windows just before releasing.:man_facepalming: I’ve just uploaded new builds for Mac to the same place - please let me know if they don’t fix the issue. They should hopefully address .ankiaddon file icon changed too.

1 Like

I did a clean install w/ 2.1.50-Mac-qt6-apple on an apple m1 pro Monterey 12.0.1 without rosetta installed and received the following error:

Error during startup: Traceback (most recent
call last):
File "aqt.main", line 114, in
init
File "aqt.main", line 146, in setupUl
File "aqt.main", line 462, in setupSound
File "aqt.sound", line 795, in setup_audio
File "aqt.sound", line 382, in
init
File "aqt.mpv", line 441, in.
init
File "aqt.mpv", line 101, in
init
File "aqt.mpv", line 127, in _start_process
File "subprocess", line 951, in
init
File "subprocess", line 1821, in
execute child
OSError: [Errno 86] Bad CPU type in
executable: '/Applications/Anki.app/Contents/
MacOS/audio/mpv'

Yep, you’ll still need Rosetta:

I wasn’t sure if that was still necessary if someone doesn’t use audio in Anki. Thanks.

require windows 10 :no_entry:

A few things: The line anki addons and what is written below it, do not appear as translatable things.
Also, I think the definition of the location of the new tickets should be moved from the general settings to the “card deck settings”. (Maybe even the whole “Scheduling” tab)
And also, change the rest of the software like settings screen, import and export and browse and so on - for the same design of the “card deck settings” screen.
The look of this screen is enviable …

Hello.
I have tried the Qt6 x86 version on Mac OS 10.15.7. I still cannot type a dead acute in Anki with the French keyboard layout which comes with the system, using the standard shortcut “Shift+Alt+&”. It works though in other applications. The toolkit has not been fixed regarding this issue?

That message will likely be removed in the future - I try to avoid making temporary strings translatable, as it causes more work for translators.

Sounds like it.

2 Likes

Linux Mint (kernel 5.11.0-38-generic)

First of all, it is freaky awesome, loved the new editor, the application is so much smoother both in safe mode and with add-ons

Athough, add-ons compatibility will take a huge hit (as mentioned in the previous toolkit windows post) got 14 add-ons breakages (idk if it is rude to putting here, since it is expected to have compatibility problems and it can be viewed by the community)

The problem mentioned by abdo and Rumo is also present here. (Great work guys)

Thanks to all, dae, devs, beta-testers, backers, supporters and translators (basically everyone in the about page of anki) for making this amazing life-changing app

3 Likes

I noticed a minor issue: in both Qt5 and Qt6 versions, every time you select a note containing a math expression in the browser, it seems that the memory usage keeps increasing gradually until you close the browser.

Will the Rosetta requirement be around for awhile? Anki is the only program I use that would require it. While not a deal breaker by any means, if I can avoid installing Rosetta I would like to. I am in-between studies at the moment and don’t need to start using Anki for a few weeks. Thanks.

Packaging up mpv looks to be somewhat involved, and I don’t yet know when I’ll have a chance to look into it.

Finally got around to testing all my regular add-ons to see what’s broken. Please note that this is without extensive testing of all add-ons and is only just on loading anki. There are probably more breaks

@dae I will hold off on posting these on the respective githubs until you tell me that they are not fixable within Anki or subject to change with future betas. I’ll do what I can to help the community upgrade so please let me know how to best assist.

Qt6 version:
AMBOSS add-on

File “/Users/Nick/Library/Application Support/Anki2/addons21/1044112126/sidepanel_web.py”, line 137, in init
self.settings().setAttribute(QWebEngineSettings.JavascriptCanOpenWindows, True)
AttributeError: type object ‘QWebEngineSettings’ has no attribute ‘JavascriptCanOpenWindows’

Image Style Editor

File “/Users/Nick/Library/Application Support/Anki2/addons21/1593969147/init.py”, line 13, in
from aqt.qt import Qt, QWidget, QDesktopWidget, QHBoxLayout, QVBoxLayout, QLabel, QFrame, QLineEdit, QCheckBox, QPushButton
ImportError: cannot import name ‘QDesktopWidget’ from ‘aqt.qt’ (unknown location)

Searching PDF Reading Note-Taking in Add Dialog

File “/Users/Nick/Library/Application Support/Anki2/addons21/1781298089/src/dialogs/importing/quick_web_import.py”, line 482, in
class SearchBar(QWidget):
File “/Users/Nick/Library/Application Support/Anki2/addons21/1781298089/src/dialogs/importing/quick_web_import.py”, line 521, in SearchBar
def on_search_forward(self, direction= QWebEnginePage.FindFlag()):
TypeError: call() missing 1 required positional argument: ‘value’

Customize Keyboard Shortcuts

File “/Users/Nick/Library/Application Support/Anki2/addons21/24411424/custom_shortcuts.py”, line 101, in cs_main_setupShortcuts
if scut.id() in id_main_config:
AttributeError: ‘QShortcut’ object has no attribute ‘id’

Field AutoComplete

File “/Users/Nick/Library/Application Support/Anki2/addons21/511710206/dialog.py”, line 194, in get_anking_menu
menu = a.menu()
AttributeError: ‘QAction’ object has no attribute ‘menu’

Straight Reward

File “/Users/Nick/Library/Application Support/Anki2/addons21/957961234/src/lib/logic.py”, line 1, in
from PyQt5 import QtWidgets, Qt
ImportError: cannot import name ‘Qt’ from ‘PyQt6’ (/Applications/Anki 2.1.50 qt6.app/Contents/MacOS/lib/PyQt6/init.py)

Exam Notifier

File “/Users/Nick/Library/Application Support/Anki2/addons21/exam_notifier/libaddon/gui/basic/widgets/qkeygrabber.py”, line 43, in
from .qt import QDialog, QPushButton, QVBoxLayout, QLabel, Qt, QKeySequence
ImportError: cannot import name ‘QDialog’ from ‘exam_notifier.libaddon.gui.basic.widgets.qt’ (/Users/Nick/Library/Application Support/Anki2/addons21/exam_notifier/libaddon/gui/basic/widgets/qt.py)

Export Single Tag for Sharing

File “/Users/Nick/Library/Application Support/Anki2/addons21/export-tag/dialog.py”, line 224, in get_anking_menu
menu = a.menu()
AttributeError: ‘QAction’ object has no attribute ‘menu’

Review Heatmap

File “/Users/Nick/Library/Application Support/Anki2/addons21/review_heatmap/libaddon/gui/basic/widgets/qkeygrabber.py”, line 43, in
from .qt import QDialog, QPushButton, QVBoxLayout, QLabel, Qt, QKeySequence
ImportError: cannot import name ‘QDialog’ from ‘review_heatmap.libaddon.gui.basic.widgets.qt’ (/Users/Nick/Library/Application Support/Anki2/addons21/review_heatmap/libaddon/gui/basic/widgets/qt.py)

Customize Background and Gear Icon

File “/Users/Nick/Library/Application Support/Anki2/addons21/zCustomback-45 update/gui_updatemanager.py”, line 416, in get_anking_menu
menu = a.menu()
AttributeError: ‘QAction’ object has no attribute ‘menu’

Image Occlusion

File “/Users/Nick/Library/Application Support/Anki2/addons21/1374772155/main.py”, line 201, in onProfileLoaded
editor._html = editor._html + io_editor_style.replace("%", “%%”)
AttributeError: module ‘aqt.editor’ has no attribute ‘_html’

Browser table editor side-by-side

File “/Users/Nick/Library/Application Support/Anki2/addons21/831846358/init.py”, line 175, in onSetupMenus
m = getMenu(self, “&View”)
File “/Users/Nick/Library/Application Support/Anki2/addons21/831846358/toolbar.py”, line 13, in getMenu
return a.menu()
AttributeError: ‘QAction’ object has no attribute ‘menu’

Fastbar

File “/Users/Nick/Library/Application Support/Anki2/addons21/Fastbar- with nightmode support/fastbar.py”, line 152, in make_and_add_toolbar
tb.setToolButtonStyle(3)
TypeError: setToolButtonStyle(self, Qt.ToolButtonStyle): argument 1 has unexpected type ‘int’

Qt5 version

Searching PDF Reading

File “/Users/Nick/Library/Application Support/Anki2/addons21/1781298089/src/init.py”, line 121, in init_addon
aqt.editor._html += “”" “”"
AttributeError: module ‘aqt.editor’ has no attribute ‘_html’

Fastbar

File “aqt.hooks_gen”, line 1030, in call
File “/Users/Nick/Library/Application Support/Anki2/addons21/Fastbar- with nightmode support/fastbar.py”, line 183, in make_and_add_toolbar
if ExtendedTagAddon and ExTaDiNo:
NameError: name ‘ExtendedTagAddon’ is not defined

2 Likes

Version ⁨2.1.50 (abd671d4)⁩
Python 3.9.7 Qt 6.2.0 PyQt 6.2.0
Macbook Air (M1, 2020)
MacOS 12.0.1 (Monterey)

I see on the beta page (Changes in 2.1.50 - Anki Betas) that it states:
The Add Cards screen will no longer allow accidental triggering of main window shortcuts when it is open on a Mac (thanks to Rumo).

However, I still am encountering this issue. I still can trigger shortcuts for both the Deck Screen and the Browse Screen, depending on which one I just switched from. I have even started with Shift held down. Is there anything that I need to enable to make this work? Thank you.

Beta 1 hasn’t been released yet. It will contain a number of changes that were made since this packaging test was made.

1 Like

Will new versions 2.1.50+ require windows 10?