Closed taurit closed 5 months ago
Hey @taurit, thanks for reporting and for providing a stack trace. I suspect this is a platform specific issue (why I didn't catch it on Mac) - sorry you're experiencing this, will get a bug fix out ASAP and report back here.
Should be fixed if you initiate an update now. Please let me know if you're still running into it.
Wow, that was quick, thanks for taking up the issue @piazzatron :)
The error no longer occurs when I launch Anki. I still cannot go to Tools -> Add-ons -> (select Smart Notes add-on) -> Config, but the stack trace is different now:
Anki 24.06.2 (33a92379) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.22631
Traceback (most recent call last):
File "aqt.addons", line 1024, in onConfig
File "C:\Users\windo\AppData\Roaming\Anki2\addons21\1531888719\src\hooks.py", line 59, in inner
return fn(processor, *args, **kwargs)
TypeError: on_options() missing 1 required positional argument: 'second'
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
AwesomeTTS - Add speech to your flashcards ['1436550454', 2024-06-01T16:05, 'None', '']
Paste Images As WebP ['1151815987', 2024-04-23T12:42, 'None', mod]
Smart Notes - AI Generated Fields with ChatGPT-4o 35 etc ['1531888719', 2024-06-19T10:15, 'None', mod]
===IDs of active AnkiWeb add-ons===
1151815987 1436550454 1531888719
===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
'' ['overview_refresh_media', 0, 'None', '']
Thanks for your help!
Well, that issue probably bricked all my windows users so I figured I should be quick 😅
Just released a new version that should fix the add-ons -> config
bug. Going to keep this thread open because you keep finding good ones.
@piazzatron Thanks for the fix! The configuration window opens now, and the add-on seems functional on Windows.
There is one more issue on Windows that was present in the previous versions (e.g., 1.0.0
) too, but I'm not sure if it's 100% reproducible and in what cases. Currently, it seems to always appear when I use the add-on to generate some context and close the "Add" window. Video:
https://github.com/piazzatron/anki-smart-notes/assets/7702278/51655162-dca5-4ee1-8bef-2afcf22aa480
Stack trace:
Anki 24.06.2 (33a92379) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.22631
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000002B22776AC10>
Traceback (most recent call last):
File "asyncio.proactor_events", line 116, in __del__
File "asyncio.proactor_events", line 108, in close
File "asyncio.base_events", line 751, in call_soon
File "asyncio.base_events", line 515, in _check_closed
RuntimeError: Event loop is closed
Exception ignored in sys.unraisablehook: <built-in function unraisablehook>
AttributeError: 'ErrorHandler' object has no attribute 'flush'
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
AwesomeTTS - Add speech to your flashcards ['1436550454', 2024-06-01T16:05, 'None', '']
Paste Images As WebP ['1151815987', 2024-04-23T12:42, 'None', mod]
Smart Notes - AI Generated Fields with ChatGPT-4o 35 etc ['1531888719', 2024-06-19T20:32, 'None', mod]
===IDs of active AnkiWeb add-ons===
1151815987 1436550454 1531888719
===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
'' ['overview_refresh_media', 0, 'None', '']
This is not critical (add-on still works), but when I work with adding new cards, it appears many times and requires some attention to close the popup.
Thanks again for your support!
This looks like a fun one 😀
Thank you for the quality bug reporting, it's invaluable for helping me figure these out.
@taurit I put up a fix for the event loop bug – firing in the dark a bit here since it's platform specific, but I'm hopeful this will work. LMK when you get a chance
Thank you for the quality bug reporting, it's invaluable for helping me figure these out.
Sure thing, thanks for taking up the issue! I'm happy to have such useful addon working reliably now.
I put up a fix for the event loop bug – firing in the dark a bit here since it's platform specific, but I'm hopeful this will work. LMK when you get a chance
I just tested it, looks great! The bug no longer reproduces in the scenario described earlier. I also worked with Anki for a few minutes (in case it was triggered in other scenarios too) but no errors were displayed. Looks like it's working and stable in Windows at the moment :)
That's great! Thank you for being the Windows beta tester.
I noticed you have a field for images in your card - would an image gen smart field be valuable for your use case? It's something I've been considering building out here
@piazzatron
That's great! Thank you for being the Windows beta tester.
My pleasure :)
I noticed you have a field for images in your card - would an image gen smart field be valuable for your use case? It's something I've been considering building out here
I was thinking about image generation too, but to be honest I think at the moment I wouldn't personally use it for the following reasons:
Have a great week!
Hi, and thanks for sharing the addon!
After upgrading the addon to 1.1.0, I started to receive the following error every time Anki starts:
It also prevents me from going into
Config
:Here's a stack trace and diagnostic information:
It seems that the addon might be looking for
manifest.json
in a wrong path? On my machine:C:\Users\windo\AppData\Local\Programs\Anki\manifest.json
indeed doesn't exist, but the following does:c:\Users\windo\AppData\Roaming\Anki2\addons21\1531888719\manifest.json
Maybe that's what was attempted to read?