Hot on the heels of the 2.1.50 release, a 2.1.51 release candidate is available with a few fixes, and a few changes that didn’t make the 2.1.50 release. The plan is to give this a week or two of testing before a stable release, and there may be an rc2 depending on what crops up before then.
My card browser is crashing when I type in “\(” to a card with existing MathJax on it. (Version 2.1.50, MacOS). The crash freezes the card editor and prevents Anki from closing (only manually killing the process works) Where should I report this?
The field in question is:
Let <anki-mathjax>X</anki-mathjax> be a Markov jump process<sup>D78</sup> where:<br><ul><li>there are <anki-mathjax>n</anki-mathjax> states, be a </li><li>the transition forces are <anki-mathjax>\mu_{ij}</anki-mathjax> where <anki-mathjax>1 \leq i,j \leq n</anki-mathjax>,</li><li>the observation time in state <anki-mathjax>i</anki-mathjax> is <anki-mathjax>v_i</anki-mathjax>,</li><li>the observed number of transitions from state <anki-mathjax>i</anki-mathjax> to state <anki-mathjax>j</anki-mathjax> is <anki-mathjax>d_{ij}</anki-mathjax></li></ul>Then the likelihood function for <anki-mathjax>X</anki-mathjax> is <anki-mathjax block="true">\begin{align}L & = {{c1::\prod_{i=1}^n \left(e^{-\left(\sum_{k \neq i} \mu_{ik}\right)v_i} \prod_{k \neq i} \mu_{ik}^{d_{ik} }\right)\\ & = \prod_{i \neq j} \left(e^{-\mu_{ij} v_i} \mu_{ij}^{d_{ij} }\right)}}\end{align}.</anki-mathjax>
A weird new bug: When editing a text field (whether in the “Add” or “Browser” window), pressing SHIFT cancels a just invoked formatting mode (bold, underline or italic).
Steps to reproduce:
Open the “Add” window
Highlight a content field
Press CTRL+B to invoke bold formatting (the “B” in the toolbar shows that it’s activated)
Type “Horse” (holding down the SHIFT key to type the capital “H”)
Expected result: Horse
Actual result: Horse
It seems to only occur if SHIFT is the first key pressed after invoking the formatting mode.
Using this version:
Anki 2.1.51 (51a0641b) Python 3.9.10 Qt 6.2.2 PyQt 6.2.2
Platform: Linux
Flags: frz=True ao=False sv=3
In my Language Tools addon, I have some field-specific actions and I noticed that the editor context menu can be triggered by right-clicking not just inside the fields, but also on the field header and that’s great because it’s a more user friendly way of allowing per-field actions. I noticed however that the right-click must be preceded with a left click in order to select the right field. over here i’ve selected a field and the right-click context menu shows the right actions
but here, I’ve right-clicked on the “Sound” header, and i’m getting the context menu from the “Chinese” field. I’d like to get the context menu for the Sound field.
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.51 (51a0641b) Python 3.9.7 Qt 6.2.2 PyQt 6.2.2
Platform: Windows 10
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-04-11 13:09:58
Caught exception:
Traceback (most recent call last):
File "aqt.taskman", line 99, in _on_closures_pending
File "aqt.taskman", line 69, in <lambda>
File "aqt.taskman", line 88, in wrapped_done
File "aqt.sync", line 116, in on_future_done
File "aqt.main", line 963, in on_collection_sync_finished
File "aqt.main", line 766, in reset
File "aqt.main", line 718, in _synthesize_op_did_execute_from_reset
File "aqt.hooks_gen", line 2951, in __call__
File "aqt.browser.browser", line 151, in on_operation_did_execute
AttributeError: 'Browser' object has no attribute 'editor'
I am not sure if a field should also get focus when its label is right-clicked. But even with the current Anki code, you can use QCursor.pos() and document.elementFromPoint() to detect which field contains the element that exists at the right-clicked position, regardless of whether it is focused or not.
Haven’t had time to try this yet but on 2.1.50 if an add-on has an error on startup, anki just shuts down instead of loading without the add-on. Has that been reported and/or fixed yet? (didn’t see it in the change log)
If an error happens as the plugin loads, Anki can catch that and show a message. But if the add-on replaces parts of Anki’s code, which in turn breaks the later part of the startup process, there’s not much that can be done about that.
Anki starting…
Initial setup…
Running with temporary Qt5 compatibility shims.
Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.
Traceback (most recent call last):
File “”, line 1, in
File “aqt”, line 45, in
File “aqt.gui_hooks”, line 11, in
File “aqt.hooks_gen”, line 18, in
File “aqt.qt”, line 20, in
File “aqt.qt.qt5_compat”, line 15, in
ModuleNotFoundError: No module named ‘PyQt6.QtCore’
Pressione qualquer tecla para continuar. . .
.
This issue occurs in anki qt5. I don’t know why, but this is causing my anki to not open. Only does open in qt6.
Anki 2.1.50 changed all bolding in the editor to use <strong> (rather than <b>) – this means that any template which has styling specifically for <b> no longer works for new cards made by Anki 2.1.50 and later (also if you bold any part of a field, any old <b> tags are switched to <strong>).
I get that <strong> is more HTML-compliant (same with <em> over <i>) but this seems like a regression. This is still an issue with the 2.1.51 beta. Would it be possible to switch back to <b>?