Unlucky-Life / ankimon

Ankimon is a Anki Addon to Gamify your learning experience
Other
35 stars 4 forks source link

New Issue #155

Closed sweeter21 closed 30 minutes ago

sweeter21 commented 3 days ago

Hi,

Tried opening anki today and was unable to open my reviewer, a window popped up saying Ankimon may be one of the add-ons involved. Disabling ankimon resolved the issue, disabling any of the other add-ons listed had no impact. Thought it may be related to me being on a different wifi network so I tried changing ssh setting, but either option had no impact.

Anki 23.12.1 (1a1d4d54) (ao) Python 3.9.15 Qt 6.5.3 PyQt 6.5.3 Platform: macOS-14.5-arm64-arm-64bit

Traceback (most recent call last): File "aqt.main", line 275, in on_focus_changed File "_aqt.hooks", line 3460, in call File "aqt.main", line 831, in on_focus_did_change File "aqt.reviewer", line 194, in refresh_if_needed File "aqt.reviewer", line 252, in nextCard File "aqt.reviewer", line 395, in _showQuestion File "_aqt.hooks", line 4258, in call File "/Users/x/Library/Application Support/Anki2/addons21/2040501954/insert_symbols.py", line 143, in on_reviewer_show_qa webview = ins_sym_webview_owners['reviewer'].web AttributeError: 'NoneType' object has no attribute 'web'

===Add-ons (active)=== (add-on provided name [Add-on folder, installed at, version, is config changed]) Add Hyperlink ['318752047', 2023-06-18T07:39, 'None', ''] Additional Card Fields Fork for 21 ['744725736', 2022-10-23T06:10, 'None', mod] Anki Killstreaks - Reward Medals for Correct Answers Fixed by Shige ['1562475180', 2024-05-01T21:24, 'None', ''] Anki Simulator ['817108664', 2023-11-06T12:26, 'None', ''] AnkiConnect ['2055492159', 2024-06-17T22:37, 'None', mod] Ankimon by Unlucky-life ['1908235722', 2024-05-16T11:07, 'None', mod] Batch Editing ['291119185', 2023-10-25T20:38, 'None', ''] BetterSearch ['1052724801', 2024-03-06T11:25, 'None', mod] Browser Resizer ['1435775540', 2023-11-11T12:16, 'None', ''] Clickable Tags v20 ['1739176371', 2022-01-30T17:58, 'None', ''] Colorful Tags Hierarchical Tags ['594329229', 2022-09-15T11:06, 'None', ''] Contanki - Controller Support for Anki beta ['1898790263', 2024-02-29T20:22, 'v1.0.2', mod] Convert Subdecks to Tag Hierarchy ['1172858842', 2023-02-07T13:15, 'None', ''] Custom Background Image and Gear Icon ['1210908941', 2023-04-18T21:19, 'None', mod] Customize Keyboard Shortcuts ['24411424', 2023-11-01T05:17, 'None', mod] Edit Field During Review Cloze ['385888438', 2024-01-03T02:19, '6.18', mod] Extended Card Stats During Review ['1008566916', 2024-02-26T14:07, 'None', ''] Extended Tag AddEdit Dialog ['1135507717', 2023-11-11T11:58, 'None', mod] Fastbar- with nightmode support ['46611790', 2023-06-27T07:47, 'None', ''] Find cards from UWorld test ['444814983', 2024-06-07T10:35, 'None', ''] High Yield Tags ['1918380616', 2023-01-10T14:14, 'None', mod] Highlight Search Results in the Browser ['225180905', 2023-10-21T15:17, 'None', ''] Hitmarkers ['1776869150', 2024-02-24T06:19, 'None', ''] Image Editor ['307397307', 2022-09-08T00:09, 'None', ''] Image Occlusion Enhanced ['1374772155', 2022-04-09T03:15, 'None', ''] Image Style Editor ['1593969147', 2021-12-17T02:01, 'None', mod] ImageResizer ['1214357311', 2023-12-02T20:58, 'None', ''] Learning Step and Review Interval Retention ['1949865265', 2024-01-06T12:48, 'None', ''] More Decks Stats and Time Left ['1556734708', 2024-04-11T06:35, 'None', mod] More Overview Stats 21 ['738807903', 2021-07-30T15:13, 'None', mod] Quick Colour Changing ['2491935955', 2023-10-18T23:15, 'None', mod] Rebuild All Empty All for Anki 21 ['1810938259', 2018-07-20T00:40, 'None', ''] Special Fields ['1102281552', 2024-03-19T19:34, 'None', ''] Symbols As You Type ['2040501954', 2024-01-20T00:42, 'None', ''] Symbols ['1461102936', 2024-02-10T11:53, 'None', mod] The KING of Button Add-ons ['374005964', 2024-01-27T05:19, 'None', mod] Zoom24 - Keep zoom level after reboot Fixed by Shige ['1923741581', 2024-05-01T21:23, 'None', ''] add-on dialog searchfilter bar ['561945101', 2023-10-18T12:22, 'None', ''] when is next learning card due today due ['563204849', 2021-12-06T10:06, 'None', mod]

===IDs of active AnkiWeb add-ons=== 1008566916 1052724801 1102281552 1135507717 1172858842 1210908941 1214357311 1374772155 1435775540 1461102936 1556734708 1562475180 1593969147 1739176371 1776869150 1810938259 1898790263 1908235722 1918380616 1923741581 1949865265 2040501954 2055492159 225180905 24411424 2491935955 291119185 307397307 318752047 374005964 385888438 444814983 46611790 561945101 563204849 594329229 738807903 744725736 817108664

===Add-ons (inactive)=== (add-on provided name [Add-on folder, installed at, version, is config changed]) Hint Hotkeys ['1844908621', 2023-04-14T10:13, 'None', ''] Review Heatmap ['1771074083', 2022-07-23T03:34, 'None', ''] Review Heatmap ['review_heatmap', 2020-04-30T09:23, 'None', ''] Web Browser - Search terms Import texts and images automatically ['864545277', 2023-11-17T14:28, 'None', mod]

Unlucky-Life commented 3 days ago

Hi @sweeter21 Your error is actually from a diffrent Addon: https://ankiweb.net/shared/info/2040501954 - Symbols as yout Type

you can see it based on this code: File "/Users/x/Library/Application Support/Anki2/addons21/2040501954/insert_symbols.py"

Unlucky-Life commented 3 days ago

I believe the issue could be based, due to Ankimon trying to reinject the code into the card but I cant tell for sure. I have the addon installed aswell and have never encountered this issue before. Did you run Anki for the first time after installing Ankimon or did that happen randomly after already using Ankimon for a while ?

sweeter21 commented 3 days ago

Hey @Unlucky-Life, thanks for the prompt response. I tried disabling that addon and re-enabling Ankimon. I am still unable to open my reviewer. I now get this debug text.

Anki 23.12.1 (1a1d4d54) (ao) Python 3.9.15 Qt 6.5.3 PyQt 6.5.3 Platform: macOS-14.5-arm64-arm-64bit

Traceback (most recent call last): File "aqt.webview", line 50, in cmd File "aqt.webview", line 157, in _onCmd File "aqt.webview", line 686, in _onBridgeCmd File "decorator", line 232, in fun File "anki.hooks", line 89, in decorator_wrapper File "anki.hooks", line 86, in repl File "/Users/x/Library/Application Support/Anki2/addons21/563204849/init.py", line 139, in myLinkHandler return _old(self, url) File "aqt.overview", line 97, in _linkHandler File "aqt.main", line 740, in moveToState File "aqt.main", line 761, in _reviewState File "aqt.reviewer", line 174, in show File "aqt.reviewer", line 194, in refresh_if_needed File "/Users/x/Library/Application Support/Anki2/addons21/864545277/review_controller.py", line 64, in wrapped originalResult = originalFunction(self) File "aqt.reviewer", line 250, in nextCard File "aqt.reviewer", line 334, in _initWeb File "aqt.webview", line 540, in stdHtml File "_aqt.hooks", line 5480, in call File "/Users/x/Library/Application Support/Anki2/addons21/1908235722/init.py", line 4837, in inject_life_bar image_base64_mypkmn = get_image_as_base64(main_pkmn_imagefile_path) File "/Users/x/Library/Application Support/Anki2/addons21/1908235722/init.py", line 616, in get_image_as_base64 with open(path, 'rb') as image_file: FileNotFoundError: [Errno 2] No such file or directory: '/Users/x/Library/Application Support/Anki2/addons21/1908235722/user_files/sprites/back_default/657.png'

===Add-ons (active)=== (add-on provided name [Add-on folder, installed at, version, is config changed]) Add Hyperlink ['318752047', 2023-06-18T07:39, 'None', ''] Additional Card Fields Fork for 21 ['744725736', 2022-10-23T06:10, 'None', mod] Anki Killstreaks - Reward Medals for Correct Answers Fixed by Shige ['1562475180', 2024-05-01T21:24, 'None', ''] Anki Simulator ['817108664', 2023-11-06T12:26, 'None', ''] AnkiConnect ['2055492159', 2024-06-17T22:37, 'None', mod] Ankimon by Unlucky-life ['1908235722', 2024-05-16T11:07, 'None', mod] Batch Editing ['291119185', 2023-10-25T20:38, 'None', ''] BetterSearch ['1052724801', 2024-03-06T11:25, 'None', mod] Browser Resizer ['1435775540', 2023-11-11T12:16, 'None', ''] Clickable Tags v20 ['1739176371', 2022-01-30T17:58, 'None', ''] Colorful Tags Hierarchical Tags ['594329229', 2022-09-15T11:06, 'None', ''] Contanki - Controller Support for Anki beta ['1898790263', 2024-02-29T20:22, 'v1.0.2', mod] Convert Subdecks to Tag Hierarchy ['1172858842', 2023-02-07T13:15, 'None', ''] Custom Background Image and Gear Icon ['1210908941', 2023-04-18T21:19, 'None', mod] Customize Keyboard Shortcuts ['24411424', 2023-11-01T05:17, 'None', mod] Edit Field During Review Cloze ['385888438', 2024-01-03T02:19, '6.18', mod] Extended Card Stats During Review ['1008566916', 2024-02-26T14:07, 'None', ''] Extended Tag AddEdit Dialog ['1135507717', 2023-11-11T11:58, 'None', mod] Fastbar- with nightmode support ['46611790', 2023-06-27T07:47, 'None', ''] Find cards from UWorld test ['444814983', 2024-06-07T10:35, 'None', ''] High Yield Tags ['1918380616', 2023-01-10T14:14, 'None', mod] Highlight Search Results in the Browser ['225180905', 2023-10-21T15:17, 'None', ''] Hitmarkers ['1776869150', 2024-02-24T06:19, 'None', ''] Image Editor ['307397307', 2022-09-08T00:09, 'None', ''] Image Occlusion Enhanced ['1374772155', 2022-04-09T03:15, 'None', ''] Image Style Editor ['1593969147', 2021-12-17T02:01, 'None', mod] ImageResizer ['1214357311', 2023-12-02T20:58, 'None', ''] Learning Step and Review Interval Retention ['1949865265', 2024-01-06T12:48, 'None', ''] More Decks Stats and Time Left ['1556734708', 2024-04-11T06:35, 'None', mod] More Overview Stats 21 ['738807903', 2021-07-30T15:13, 'None', mod] Quick Colour Changing ['2491935955', 2023-10-18T23:15, 'None', mod] Rebuild All Empty All for Anki 21 ['1810938259', 2018-07-20T00:40, 'None', ''] Special Fields ['1102281552', 2024-03-19T19:34, 'None', ''] Symbols ['1461102936', 2024-02-10T11:53, 'None', mod] The KING of Button Add-ons ['374005964', 2024-01-27T05:19, 'None', mod] Web Browser - Search terms Import texts and images automatically ['864545277', 2023-11-17T14:28, 'None', mod] Zoom24 - Keep zoom level after reboot Fixed by Shige ['1923741581', 2024-05-01T21:23, 'None', ''] add-on dialog searchfilter bar ['561945101', 2023-10-18T12:22, 'None', ''] when is next learning card due today due ['563204849', 2021-12-06T10:06, 'None', mod]

===IDs of active AnkiWeb add-ons=== 1008566916 1052724801 1102281552 1135507717 1172858842 1210908941 1214357311 1374772155 1435775540 1461102936 1556734708 1562475180 1593969147 1739176371 1776869150 1810938259 1898790263 1908235722 1918380616 1923741581 1949865265 2055492159 225180905 24411424 2491935955 291119185 307397307 318752047 374005964 385888438 444814983 46611790 561945101 563204849 594329229 738807903 744725736 817108664 864545277

===Add-ons (inactive)=== (add-on provided name [Add-on folder, installed at, version, is config changed]) Hint Hotkeys ['1844908621', 2023-04-14T10:13, 'None', ''] Review Heatmap ['1771074083', 2022-07-23T03:34, 'None', ''] Review Heatmap ['review_heatmap', 2020-04-30T09:23, 'None', ''] Symbols As You Type ['2040501954', 2024-01-20T00:42, 'None', '']

sweeter21 commented 3 days ago

I believe the issue could be based, due to Ankimon trying to reinject the code into the card but I cant tell for sure. I have the addon installed aswell and have never encountered this issue before. Did you run Anki for the first time after installing Ankimon or did that happen randomly after already using Ankimon for a while ?

I have had ankimon installed for a few weeks now, just got my first starter pokemon evolved yesterday! I have also had issues with my anki app freezing intermittently, though I eventually realized this only happens when I have the animated gif in reviewer set to on, so I have kept it off since I made that connection. Not sure if this is related to the current issue but didn't seem worth opening up a separate thread since I was able to fix it myself (though it is sad to not be able to see my little sprite move back and forth)

Unlucky-Life commented 3 days ago

Hey no biggie @sweeter21 , Ok, this makes a lot more sense ! There is an easy fix for this: Basically download the files fron this link:

https://github.com/Unlucky-Life/ankimon/tree/main/missing_back_sprites

and download the missing sprites in that folder. Then copy them into this path:

/Users/x/Library/Application Support/Anki2/addons21/1908235722/user_files/sprites/back_default/

and your issue should be fixed !

Unlucky-Life commented 3 days ago

Once did this just close and reopen anki and done deal ✔️.

The intermitted freezing with gif sprites can be due to either your Anki Cards having alot of Code / Styling inside or the gifs being a little much for anki sonetimes to handle :).

sweeter21 commented 3 days ago

Thank you! I may be just be blind and missing an obvious button, but is there a way to download them all at once? I only seem to be able to download each sprite individually.

Unlucky-Life commented 3 days ago

Actually havent thought about this. Basically GitHub would make you download the complete repository and then normally you would need to navigate to the folder. The repository is quite big so i just uploaded a zip file with all the missing sprites: https://github.com/Unlucky-Life/ankimon/blob/main/missing_back_sprites/missing_back_sprites.zip Just download this - left click to unzip - and then just place the sprites into the back_sprites folder :)

sweeter21 commented 3 days ago

All good now! Thanks for the help.

Last thing, a non-urgent feature request - please make an option to see the front sprite in the reviewer without having reviewer_image_gif set to on! With the freezing happening when i have the gifs on i don't really get to see the front of my pokemon unless i open the collection.

Unlucky-Life commented 3 days ago

Perfect! No biggie !

Ah I see ! Yea that should be possible !