image-occlusion-enhanced
image-occlusion-enhanced copied to clipboard
Got String, expected Int
Problem description
Error occurs when trying to add an image occlusion card while hitting "hide all, guess one", "hide one, guess one" doesn't help either.
Checklist
- [x] I've restarted Anki to see if it helps
- [x] I've verified that I use the latest version of the add-on by redownloading it from AnkiWeb
- [x] I've verified that I use the latest version of Anki by checking at https://apps.ankiweb.net#download
- [x] I've tried to disable other add-ons to see if there are any interactions present
- [x] My issue disappears when I hold shift while starting Anki.
- [x] I've checked if anyone else reported this problem before by looking through the issue reports. I also checked to see if there is a section about known issues in the add-on description, documentation, or README.
Information about your Anki set-up
Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 7
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-01-15 18:06:07
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Image Occlusion Enhanced ['image_occlusion_enhanced', 2020-04-28T19:45, 'None', '']
===IDs of active AnkiWeb add-ons===
===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Error message (if any)
Debug info:
Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 7
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-01-15 18:06:07
Caught exception:
Traceback (most recent call last):
File "google\protobuf\internal\python_message.py", line 713, in field_setter
File "google\protobuf\internal\type_checkers.py", line 166, in CheckValue
TypeError: '1' has type <class 'str'>, but expected one of: (<class 'int'>,)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "google\protobuf\internal\python_message.py", line 569, in init
File "google\protobuf\internal\python_message.py", line 715, in field_setter
TypeError: Cannot set anki.notes.AddNoteRequest.deck_id to '1': '1' has type <class 'str'>, but expected one of: (<class 'int'>,)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "aqt\webview.py", line 541, in handler
File "C:\Users\user\AppData\Roaming\Anki2\addons21\image_occlusion_enhanced\add.py", line 278, in <lambda>
lambda val, choice=choice, close=close: self._onAddNotesButton(choice, close, val))
File "C:\Users\user\AppData\Roaming\Anki2\addons21\image_occlusion_enhanced\add.py", line 293, in _onAddNotesButton
r = gen.generateNotes()
File "C:\Users\user\AppData\Roaming\Anki2\addons21\image_occlusion_enhanced\ngen.py", line 96, in generateNotes
self._saveMaskAndReturnNote(omask_path, qmasks[nr], amasks[nr],
File "C:\Users\user\AppData\Roaming\Anki2\addons21\image_occlusion_enhanced\ngen.py", line 446, in _saveMaskAndReturnNote
mw.col.addNote(note)
File "anki\collection.py", line 1140, in addNote
File "anki\collection.py", line 373, in add_note
File "anki\_backend\generated.py", line 301, in add_note
File "google\protobuf\internal\python_message.py", line 571, in init
File "google\protobuf\internal\python_message.py", line 488, in _ReraiseTypeErrorWithFieldName
File "six.py", line 718, in reraise
File "google\protobuf\internal\python_message.py", line 569, in init
File "google\protobuf\internal\python_message.py", line 715, in field_setter
TypeError: Cannot set anki.notes.AddNoteRequest.deck_id to '1': '1' has type <class 'str'>, but expected one of: (<class 'int'>,) for field AddNoteRequest.deck_id