Module 'aqt.gui_hooks' has no attribute 'backend_will_block'

Am I doing something wrong or is this hook outdated?

My code:
gui_hooks.backend_will_block.append(start())

The error log:

When loading '⁨test_addon⁩':
⁨Traceback (most recent call last):
  File "aqt\addons.py", line 210, in loadAddons
  File "C:\Users\Samsung\AppData\Roaming\Anki2\addons21\test_addon\__init__.py", line 54, in <module>
    gui_hooks.backend_will_block.append(start())
AttributeError: module 'aqt.gui_hooks' has no attribute 'backend_will_block'

It appears that the hook was introduced after the release of 2.1.44. Try the latest beta version of 2.1.45 or the main branch on github.

1 Like