m-rtin / anki-ipa

Anki add-on to insert IPA transcriptions
https://ankiweb.net/shared/info/799647424
GNU Affero General Public License v3.0
21 stars 12 forks source link

AttributeError: 'AnkiQt' object has no attribute 'CollectionOp' #68

Open Evelinealy opened 12 months ago

Evelinealy commented 12 months ago

Hello! I am currently using Windows 11 with Anki 2. The language that I am trying to use the IPA addon is with French. Everything runs smoothly (going to edit -> add IPA) and I have no issue up until the point where I press "Add". It gives me a warning about overwriting, so that's normal, but then it pops up the error

Debug info:
Anki 2.1.47 (dc156f34) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-11-29 08:31:19

Caught exception:
Traceback (most recent call last):
  File "C:\Users\XXXX\AppData\Roaming\Anki2\addons21\799647424\batch_adding.py", line 170, in add_ipa_transcription
    mw.CollectionOp()
AttributeError: 'AnkiQt' object has no attribute 'CollectionOp'

I didn't want to bug you about this, so I tried going in and removing the 'CollectionOp' function myself (I just commented it out). However, doing this did not solve the problem. When I pressed 'Add' it would overwrite the field (that I wanted it to overwrite), but it would add absolutely nothing.

Here is a screenshot of once I press "proceed" after getting the overwritten error. Screenshot 2023-11-29 130849

I'm really hoping the solution to this error is as easy as just updating my system. I just installed your addon a few days ago, so I don't think I have the outdated version of it. Have you ever seen this issue before?

Thank you -Eveline