Anki 2.1.20 (beta 5) error : wrapped C/C++ object of type QPushButton has been deleted

Ab's Avatar

Ab

25 Jan, 2020 08:34 PM

After editing a card type, I clicked the close button and the following error appeared.

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 on the add-ons section of our support site.
Debug info:
Anki 2.1.20 (d428b3b4) Python 3.8.0 Qt 5.14.0 PyQt 5.13.2
Platform: Windows 10
Flags: frz=True ao=True sv=1

Caught exception:
Traceback (most recent call last):
  File "aqt\clayout.py", line 598, in accept
  File "aqt\clayout.py", line 609, in reject
  File "aqt\main.py", line 622, in reset
  File "aqt\gui_hooks.py", line 807, in __call__
  File "lib\site-packages\anki\hooks.py", line 451, in runHook
  File "aqt\modelchooser.py", line 47, in onReset
  File "aqt\modelchooser.py", line 93, in updateModels
RuntimeError: wrapped C/C++ object of type QPushButton has been deleted

  1. Support Staff 1 Posted by Damien Elmes on 26 Jan, 2020 01:53 AM

    Damien Elmes's Avatar

    Can you reproduce it with add-ons disabled?

  2. 2 Posted by Ab on 26 Jan, 2020 09:58 AM

    Ab's Avatar

    I'll try.

  3. 3 Posted by br on 26 Jan, 2020 11:26 AM

    br's Avatar

    I got the same error after closing the "Cards" dialog in the "Edit Current" window (during review).
    Unfortunately, I fail to reproduce it, even with the same add-ons in effect. I am not sure if they are causing it though, I don't use that many.

  4. 4 Posted by Ab on 26 Jan, 2020 12:03 PM

    Ab's Avatar

    The same error happened again. When I clicked on another note I got a different one:

    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 on the add-ons section of our support site.
    Debug info:
    Anki 2.1.20 (d428b3b4) Python 3.8.0 Qt 5.14.0 PyQt 5.13.2
    Platform: Windows 10
    Flags: frz=True ao=True sv=1

    Caught exception:
    Traceback (most recent call last):
      File "<C:\Program Files\Anki\decorator.pyc:decorator-gen-6>", line 2, in _onRowChanged
      File "lib\site-packages\anki\hooks.py", line 506, in decorator_wrapper
      File "lib\site-packages\anki\hooks.py", line 497, in repl
      File "aqt\browser.py", line 828, in _onRowChanged
      File "aqt\editor.py", line 393, in setNote
      File "C:\Users\Ab\AppData\Roaming\Anki2\addons21\864545277\editor_controller.py", line 53, in wrapped
        originalResult = originalFunction(self)
      File "C:\Users\Ab\AppData\Roaming\Anki2\addons21\516643804\main.py", line 181, in loadNote21
        self.web.evalWithCallback("setFields(%s); setFonts(%s); focusField(%s); setNoteId(%s)" % (
    AttributeError: 'NoneType' object has no attribute 'evalWithCallback'

  5. 5 Posted by Ab on 26 Jan, 2020 12:06 PM

    Ab's Avatar

    And another one:

    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 on the add-ons section of our support site.
    Debug info:
    Anki 2.1.20 (d428b3b4) Python 3.8.0 Qt 5.14.0 PyQt 5.13.2
    Platform: Windows 10
    Flags: frz=True ao=True sv=1

    Caught exception:
    Traceback (most recent call last):
      File "C:\Users\Ab\AppData\Roaming\Anki2\addons21\874215009\advancedbrowser\core.py", line 417, in closeEvent
        super(AdvancedBrowser, self).closeEvent(evt)
      File "<C:\Program Files\Anki\decorator.pyc:decorator-gen-8>", line 2, in closeEvent
      File "lib\site-packages\anki\hooks.py", line 506, in decorator_wrapper
      File "lib\site-packages\anki\hooks.py", line 501, in repl
      File "aqt\browser.py", line 659, in closeEvent
      File "aqt\editor.py", line 442, in saveNow
    AttributeError: 'NoneType' object has no attribute 'evalWithCallback'

  6. 6 Posted by Ab on 26 Jan, 2020 12:08 PM

    Ab's Avatar

    Again:

    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 on the add-ons section of our support site.
    Debug info:
    Anki 2.1.20 (d428b3b4) Python 3.8.0 Qt 5.14.0 PyQt 5.13.2
    Platform: Windows 10
    Flags: frz=True ao=True sv=1

    Caught exception:
    Traceback (most recent call last):
      File "C:\Users\Ab\AppData\Roaming\Anki2\addons21\864545277\browser.py", line 98, in clozeBrowser
        fn(evt)
      File "aqt\main.py", line 921, in closeEvent
      File "aqt\main.py", line 388, in unloadProfileAndExit
      File "aqt\main.py", line 363, in unloadProfile
      File "aqt\main.py", line 465, in unloadCollection
      File "aqt\main.py", line 739, in closeAllWindows
      File "C:\Users\Ab\AppData\Roaming\Anki2\addons21\354407385\multiple.py", line 140, in closeAll
        instance.closeWithCallback(callback)
      File "aqt\browser.py", line 683, in closeWithCallback
      File "aqt\editor.py", line 442, in saveNow
    AttributeError: 'NoneType' object has no attribute 'evalWithCallback'

  7. 7 Posted by Ab on 26 Jan, 2020 12:11 PM

    Ab's Avatar

    I don't know if these errors are related to the one I mentioned in the subject, though.

  8. 8 Posted by Ab on 26 Jan, 2020 02:07 PM

    Ab's Avatar

    It happened again when I tried importing a .csv file:

    Debug info:
    Anki 2.1.20 (d428b3b4) Python 3.8.0 Qt 5.14.0 PyQt 5.13.2
    Platform: Windows 10
    Flags: frz=True ao=True sv=1

    Caught exception:
    Traceback (most recent call last):
      File "aqt\importing.py", line 216, in accept
      File "aqt\main.py", line 622, in reset
      File "aqt\gui_hooks.py", line 807, in __call__
      File "lib\site-packages\anki\hooks.py", line 451, in runHook
      File "aqt\modelchooser.py", line 47, in onReset
      File "aqt\modelchooser.py", line 93, in updateModels
    RuntimeError: wrapped C/C++ object of type QPushButton has been deleted

  9. 9 Posted by Ab on 26 Jan, 2020 02:52 PM

    Ab's Avatar

    I got the same error again, and the only addon that is enabled is "Quick note and deck buttons (Fork for 2.1)"

  10. 10 Posted by br on 26 Jan, 2020 05:03 PM

    br's Avatar

    Also got "wrapped C/C++ object of type QPushButton has been deleted" error two times today, one time on closing "Edit Current" -> "Cards", one time on closing the preferences dialog. Windows 10, Beta 5.

  11. 11 Posted by Ab on 26 Jan, 2020 10:35 PM

    Ab's Avatar

    The problem seems to be related to the add-on "Quick note and deck buttons (Fork for 2.1)".

    https://github.com/ijgnd/anki21__editor_quick_note_and_deck_buttons/issues/2

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac