Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon causes exception II #30

Open
jthulhu opened this issue Aug 25, 2021 · 2 comments
Open

Addon causes exception II #30

jthulhu opened this issue Aug 25, 2021 · 2 comments

Comments

@jthulhu
Copy link

jthulhu commented Aug 25, 2021

When clicking on "Write To Templates", the following error pops-up:

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-on support site.
Debug info:
Anki 2.1.46 (94913ec2) Python 3.8.1 Qt 5.15.1 PyQt 5.15.1
Platform: Linux
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-08-24 18:56:10
Add-ons possibly involved: ⁨Asset Manager⁩

Caught exception:
Traceback (most recent call last):
  File "/home/adri/.local/share/Anki2/addons21/656021484/gui_config/config.py", line 58, in writeBackCurrentSetting
    self.write_back_callback(*self.export_data())
  File "/home/adri/.local/share/Anki2/addons21/656021484/src/models.py", line 22, in write_back
    setup_model(model_id, html_data, script_data)
  File "/home/adri/.local/share/Anki2/addons21/656021484/src/model_editor/__init__.py", line 11, in setup_model
    setup_with_only_scripts(model_id, scripts)
  File "/home/adri/.local/share/Anki2/addons21/656021484/src/model_editor/setup_scripts.py", line 84, in setup_with_only_scripts
    mw.col.models.save(model, True)
TypeError: save() takes from 1 to 2 positional arguments but 3 were given
@hgiesel
Copy link
Owner

hgiesel commented Aug 25, 2021

This error only concerns "notifying" the note type that it changed. If you just quickly open and close the card template dialog after you get this error message you can work around this.

I'll try to look into this shortly

@jthulhu
Copy link
Author

jthulhu commented Aug 26, 2021

Indeed, the workaround works. Thanks for the temporary hack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants