Error when adding a new note

Today I came across the following error when I pressed Add after filling new note form. It happened to my few times on different computers - all with 2.1.29

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.29 (bbff62bf) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-07-31 20:57:52

Caught exception:
Traceback (most recent call last):
  File "aqt\webview.py", line 490, in handler
  File "aqt\editor.py", line 479, in <lambda>
  File "aqt\addcards.py", line 189, in _addCards
  File "aqt\editor.py", line 591, in saveAddModeVars
  File "lib\site-packages\anki\models.py", line 87, in save
  File "lib\site-packages\anki\models.py", line 231, in update
  File "lib\site-packages\anki\rsbackend_gen.py", line 414, in add_or_update_notetype
  File "lib\site-packages\anki\rsbackend.py", line 265, in _run_command
anki.rsbackend.InvalidInput: InvalidInput { info: "attempt to save stale notetype" }

I didn’t either add or update any addon.
After closing the error message I could add a new note without further errors.

1 Like

Can you reproduce the problem when you hold down the shift key while starting Anki to disable add-ons? If so, what steps should I take to trigger it?

1 Like

Unfortunately (fortunately?) it hasn’t happened again… yet.

1 Like

I get this error every time I add a card on one of my machines when the previous card I added was on the other. “Check Database” fixes it, and I can then add the card.

Both machines are Windows 10, and I’ve seen this with Anki 2.1.28 and 2.1.29. No add-ons running on either.

Definitely never happened pre-pandemic, when I swapped between these machines frequently. Not sure when exactly it started because I’ve mostly been using one machine since then.

Here’s the error I just got on my laptop:

Error
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.29 (bbff62bf) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=False sv=2
Add-ons, last update check: 2020-08-09 21:17:16

Caught exception:
Traceback (most recent call last):
  File "aqt\webview.py", line 490, in handler
  File "aqt\editor.py", line 479, in <lambda>
  File "aqt\addcards.py", line 189, in _addCards
  File "aqt\editor.py", line 591, in saveAddModeVars
  File "lib\site-packages\anki\models.py", line 87, in save
  File "lib\site-packages\anki\models.py", line 231, in update
  File "lib\site-packages\anki\rsbackend_gen.py", line 414, in add_or_update_notetype
  File "lib\site-packages\anki\rsbackend.py", line 265, in _run_command
anki.rsbackend.InvalidInput: InvalidInput { info: "attempt to save stale notetype" }

Thanks for the repro steps, I’ll look into this.

Hi All,
I get the following error occasionally (1 per 30 cards perhaps) when I click “Add” after making a new card.
The error happens on multiple computers. I’ve tried the standard “database check” to no avail…
P.s. once I click the error away the card then saves normally…
Any help would be much appreciated
Thanks and best,
J

ERROR
Error
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.29 (bbff62bf) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=False sv=1
Add-ons, last update check: 2020-08-11 21:31:25

Caught exception:
Traceback (most recent call last):
File “aqt\webview.py”, line 490, in handler
File “aqt\editor.py”, line 479, in
File “aqt\addcards.py”, line 189, in _addCards
File “aqt\editor.py”, line 591, in saveAddModeVars
File “lib\site-packages\anki\models.py”, line 87, in save
File “lib\site-packages\anki\models.py”, line 231, in update
File “lib\site-packages\anki\rsbackend_gen.py”, line 414, in add_or_update_notetype
File “lib\site-packages\anki\rsbackend.py”, line 265, in _run_command
anki.rsbackend.InvalidInput: InvalidInput { info: “attempt to save stale notetype” }

Can you reproduce this error in 2.1.30?

1 Like

(moved into the existing topic)

For what it’s worth, I also get this once in a while when pressing the “Add” button on a new note. It seems entirely unpredictable, and after closing the error window, I can add the note fine. It persists in 2.1.30. I’ve not written about it here since I’ve not been able to predictably reproduce it.

Thanks for the answers . I’ve updated all software now (embarrassed I didn’t notice the new version!).
Will post the error-dump, when it next pops up. As pinnerup says, its not a total loss of functionality…just a bit disconcerting
Thanks and best,

Hmm, I still have not been able to reproduce this - any extra info that would help narrow it down would be appreciated.

This error (or something very similar) happened to me just now as I was adding a cloze note. Again, I’ve not been able to consistently reproduce it; it seems random when it occurs. After closing the “Error” box, I press “Add” once more and it adds the note as expected.

What steps did you take prior to clicking on add? Did you sync shortly prior to that?

In my case it is also about cloze notes.

What steps did you take prior to clicking on add? Did you sync shortly prior to that?

I’m not entirely sure, but I think I just started up Anki (at which point it automatically syncs) and then opened up the Add dialogue to add the note.

So you clicked on add, typed some stuff in, and clicked add without making any other changes, like selecting a different notetype or deck?

I probably selected the Cloze note type, but apart from that, I don’t believe I did much else at that point. I realize that’s not much to work with. I’ll keep an eye out and report if I notice something else.

It just occured 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, 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.30 (06a69c25) Python 3.8.1 Qt 5.15.0 PyQt 5.15.0
Platform: Linux
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-08-19 22:12:52

Caught exception:
Traceback (most recent call last):
File “aqt/webview.py”, line 493, in handler
File “aqt/editor.py”, line 485, in
File “aqt/addcards.py”, line 189, in _addCards
File “aqt/editor.py”, line 597, in saveAddModeVars
File “anki/models.py”, line 87, in save
File “anki/models.py”, line 231, in update
File “anki/rsbackend_gen.py”, line 414, in add_or_update_notetype
File “anki/rsbackend.py”, line 265, in _run_command
anki.rsbackend.InvalidInput: InvalidInput { info: “attempt to save stale notetype” }

This was not a cloze note, but a rather common reversed note. Also, this was on Linux, whereas the error above was on macOS. I don’t believe I did anything but open Anki, press “Add” and then enter the various data. As the other times, after closing the error window, I can add the note fine.

(comment removed; was intended for a different post)