Bug: Lack of syntax validation of pycmd in Anki Desktop


An error occurred. Please use Tools > Check Database to see if that fixes the problem.
If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.
Anki 2.1.48 (fb07bad3) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=False sv=2
Add-ons, last update check: 2021-10-04 15:55:18

Caught exception:
Traceback (most recent call last):
File “aqt\webview.py”, line 41, in cmd
File “aqt\webview.py”, line 142, in _onCmd
File “aqt\webview.py”, line 595, in _onBridgeCmd
File “aqt\reviewer.py”, line 509, in _linkHandler
File “aqt\sound.py”, line 863, in play_clicked_audio
ValueError: not enough values to unpack (expected 3, got 2)

Appears when viewing back side of

{{FrontSide}} (which is just {{Front}})

<hr id=answer>



I don’t know if this works as intended or if there is intended to be error checking in functions exposed to the card interface.

It’s an internal API not intended to be used on cards.

1 Like