sobjornstad / AnkiLPCG

Addon for dae/anki for studying lyrics and poetry

Home Page:https://ankilpcg.readthedocs.io/en/latest/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Having errors every time I add another poem

elenac24 opened this issue · comments

Hi, I've been using this add-on only fairly recently to learn my poems as part of my English course. Adding one poem seems to be fine, all is working. However, the second I add another poem or attempt to edit the first one to allow to 'type in' my response, an error response appears and I can't proceed without multiple error windows appearing at once.

I attempted to sift through add-ons i was previously using to see if they were causing the problem, but it seems to be this one.

It's such a shame! I really was looking forward to using this for my study.

I'm currently using the Anki software for MacOS with Apple Silicon (if that helps) :)

Can you copy and paste the complete error message here? We can definitely get this fixed, but it's impossible to know what's going on without the error.

Of course,

I did try disabling the add-ons and going through one by one to see which one was causing the issues, but it seems to be this one...

here is the error message :)

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, repeat 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.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Platform: Mac 13.0
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-11-18 20:25:00
Add-ons possibly involved: ⁨LPCG LyricsPoetry Cloze Generator⁩

Caught exception:
Traceback (most recent call last):
File "/Users/elenacaredes/Library/Application Support/Anki2/addons21/2084557901/lpcg_dialog.py", line 89, in accept
self.mw.reset()
File "aqt.main", line 770, in reset
File "aqt.main", line 722, in _synthesize_op_did_execute_from_reset
File "aqt.hooks_gen", line 3091, in call
File "aqt.deckchooser", line 120, in on_operation_did_execute
File "aqt.deckchooser", line 82, in _update_button_label
RuntimeError: wrapped C/C++ object of type QPushButton has been deleted

I'm a little confused here. What exactly are you doing when this error message comes up? Above you said this happened when you tried to edit the template to type in the answer, but I don't see a way that this traceback could be obtained from that action – it can only happen when actually generating notes.

(It could be you're getting different errors in different cases – I need all of them.)

Also, your line numbers don't seem to quite match mine. I just pushed a new version of LPCG – please update to that from Tools > Add-ons and see if that changes anything. There aren't any fixes targeting this issue in there, but it's possible that will help (I just forgot to release these bugfixes a little while ago).

Yep, that error message happened when i was generating a new note. I can find the error message for editing the note as well, if you want.

Of course,I’ll update the add-on soon :) thank you!

Just wanted to add in this conversation that I also have the same error. I've got the newest version of LPCG installed.

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.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Platform: Mac 13.0.1
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-12-10 22:05:07
Add-ons possibly involved: ⁨LPCG LyricsPoetry Cloze Generator⁩

Caught exception:
Traceback (most recent call last):
  File "/Users/home/Library/Application Support/Anki2/addons21/2084557901/lpcg_dialog.py", line 93, in accept
    self.mw.reset()
  File "aqt.main", line 770, in reset
  File "aqt.main", line 722, in _synthesize_op_did_execute_from_reset
  File "aqt.hooks_gen", line 3091, in __call__
  File "aqt.deckchooser", line 120, in on_operation_did_execute
  File "aqt.deckchooser", line 82, in _update_button_label
RuntimeError: wrapped C/C++ object of type QPushButton has been deleted

If I open Anki and generate notes, it always works the first time with no issues. Any time after that, if I try to use LPCG again, the error pops up.

It even pops up when I try to sync in one direction, strangely enough.

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.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Platform: Mac 13.0.1
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-12-10 22:05:07

Caught exception:
Traceback (most recent call last):
  File "aqt.taskman", line 122, in _on_closures_pending
  File "aqt.taskman", line 71, in <lambda>
  File "aqt.taskman", line 90, in wrapped_done
  File "aqt.sync", line 196, in on_future_done
  File "aqt.main", line 770, in reset
  File "aqt.main", line 722, in _synthesize_op_did_execute_from_reset
  File "aqt.hooks_gen", line 3091, in __call__
  File "aqt.deckchooser", line 120, in on_operation_did_execute
  File "aqt.deckchooser", line 82, in _update_button_label
RuntimeError: wrapped C/C++ object of type QPushButton has been deleted

If I close and reopen Anki, it's the same as before. The first note generation is fine, every time after gives an error.

I just updated Anki to the Apple Silicon version of 2.1.54 today. Before that, I was on 2.1.49 and there were no errors. Hopefully there's something in these errors that can help.

I completely forgot about this thread! sorry.

yes, i’m having the same problem, even when restarting. had to delete Anki and restart and it was still having errors when adding a new cloze or editing

Updated LPCG and this is the error I get when adding more than one poem

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, repeat 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.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Platform: Mac 13.0
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-12-11 17:58:20
Add-ons possibly involved: ⁨LPCG LyricsPoetry Cloze Generator⁩

Caught exception:
Traceback (most recent call last):
File "/Users/elenacaredes/Library/Application Support/Anki2/addons21/2084557901/lpcg_dialog.py", line 93, in accept
self.mw.reset()
File "aqt.main", line 770, in reset
File "aqt.main", line 722, in _synthesize_op_did_execute_from_reset
File "aqt.hooks_gen", line 3091, in call
File "aqt.deckchooser", line 120, in on_operation_did_execute
File "aqt.deckchooser", line 82, in _update_button_label
RuntimeError: wrapped C/C++ object of type QPushButton has been deleted

Not sure if its the same as the previous one but still wanted to send just in case

I don't seem to be getting an error when editing cards anymore, but this occurred when generating a new set of cards. I generated 1 set (18 cards roughly) but when generating another, the next two seemed fine before this error message appeared

Just wanted to let everyone know I started getting this too. :) I'll try to remember to take a look at it soon – most likely something in Anki changed so that LPCG needs to clean something up before closing the add dialog.

And in the meantime if this happens while not adding/editing you can restart Anki to fix it.

I'm new to this plugin, have the latest version, and restarting is not helping. Also, after restarting, when I try to add the same poem that failed the first time, it tells me I already have the poem in my database but I can see no record of it. Here's my version of the error message. Thanks!

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.61 (0c1eaf4c) Python 3.9.15 Qt 6.3.2 PyQt 6.3.1
Platform: macOS-13.6.2-arm64-arm-64bit
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-12-05 15:42:08

Caught exception:
Traceback (most recent call last):
  File "aqt.taskman", line 122, in _on_closures_pending
  File "aqt.taskman", line 71, in <lambda>
  File "aqt.taskman", line 90, in wrapped_done
  File "aqt.sync", line 117, in on_future_done
  File "aqt.main", line 1027, in on_collection_sync_finished
  File "aqt.main", line 821, in reset
  File "aqt.main", line 773, in _synthesize_op_did_execute_from_reset
  File "_aqt.hooks", line 3547, in __call__
  File "aqt.deckchooser", line 120, in on_operation_did_execute
  File "aqt.deckchooser", line 82, in _update_button_label
RuntimeError: wrapped C/C++ object of type QPushButton has been deleted

Hmm, are you sure restarting doesn't fix it? It still does for me

For what it's worth @surrain, you do not have the latest version of Anki (it moved to a time-based versioning system and is now 23.10), but that presumably has nothing to do with the issue here since it's been occurring for some months.

You can find the item that is already in your collection by searching for "Title:X" in the browser, where X is the title.

Fixed in version 1.4.3, released to AnkiWeb now