glutanimate / anki-addons-misc

Various add-ons I've written for Anki
https://ankiweb.net/shared/addons/
GNU Affero General Public License v3.0
171 stars 56 forks source link

[Field History] Incompatibility with Anki 23.x #201

Open srustamo opened 6 months ago

srustamo commented 6 months ago

Problem description

Please describe the issue concisely in here. In case of an error: Walk us through the steps you took to get there. What happened? What did you expect to happen?

Checklist

Please replace the space inside the brackets with an x if the following items apply:

Information about your Anki set-up

Please open Anki, go to Help → About, click on "Copy Debug Info", and paste the result between the backticks below (if the button does not appear you are using an older version of Anki 2.1 and will need to update first):

Anki 23.12.1 (1a1d4d54)  (ao)
Python 3.9.15 Qt 5.14.2 PyQt 5.14.1
Platform: macOS-10.15.7-x86_64-i386-64bit

Traceback (most recent call last):
  File "aqt.webview", line 50, in cmd
  File "aqt.webview", line 157, in _onCmd
  File "aqt.webview", line 680, in _onBridgeCmd
  File "_aqt.hooks", line 5415, in __call__
  File "/Users/srmbp1/Library/Application Support/Anki2/addons21/1771074083/web_bridge.py", line 88, in bridge
    ret = self._handle_message(message, context)
  File "/Users/srmbp1/Library/Application Support/Anki2/addons21/1771074083/web_bridge.py", line 114, in _handle_message
    return self._command_handler(command, payload, context)
  File "/Users/srmbp1/Library/Application Support/Anki2/addons21/1771074083/web_bridge.py", line 151, in __call__
    return handler(self, payload, context)  # type: ignore
  File "/Users/srmbp1/Library/Application Support/Anki2/addons21/1771074083/web_bridge.py", line 155, in browse
    browser = aqt.dialogs.open("Browser", self._mw)
  File "aqt", line 136, in open
  File "aqt.browser.browser", line 143, in __init__
  File "aqt.browser.browser", line 532, in setupEditor
  File "aqt.editor", line 143, in __init__
  File "aqt.editor", line 196, in setupWeb
  File "anki.hooks", line 45, in runFilter
TypeError: onSetupButtons20() takes 1 positional argument but 2 were given

Traceback (most recent call last):
  File "aqt.browser.browser", line 243, in resizeEvent
  File "aqt.browser.browser", line 232, in maybe_update_layout
AttributeError: 'Browser' object has no attribute 'aspect_ratio'

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
AnkiConnect ['2055492159', 2024-02-27T09:37, 'None', mod]
Field History ['1247884413', 2019-01-08T23:34, 'None', mod]
Review Heatmap ['1771074083', 2022-06-30T06:43, 'None', '']

===IDs of active AnkiWeb add-ons===
1247884413 1771074083 2055492159

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Customize Keyboard Shortcuts ['24411424', 2023-11-01T14:17, 'None', '']
Field AutoComplete ['511710206', 2023-02-26T05:27, 'None', mod]
Global hotkeys keyboard shortcuts ['1146841074', 2022-07-04T02:31, 'None', '']

Error message (if any)

If you've received an error message, please copy and paste it between the backticks below:

Anki encountered a problem. Please follow the troubleshooting steps.
Add-ons possibly involved: ⁨Review Heatmap⁩
glutanimate commented 6 months ago

Hi there, thanks for the report!

Although the error message mentions Review Heatmap, the actual underlying issue seems to be with Field History. If you disable that add-on, clicking on the heatmap should work again.

I will transfer this issue to Field History's repo.

thiswillbeyourgithub commented 5 months ago

Btw in #202 (the version check was just failing) in 9b9f334 but ended up fixing the qt6 issue arising just afterwards in e264c7e and now it works appart from glitching the tag field. Meaning after using the history in mode "full" or "partial" the tag field is not actually properly restored and gets glitched until you close the add window.

Progress nonetheless