sobjornstad / TiddlyRemember

Embed Anki notes in your TiddlyWiki
https://sobjornstad.github.io/TiddlyRemember/
MIT License
65 stars 7 forks source link

TiddlyRemember Add-on crashes Anki (v23.10.1 Qt6) #80

Closed DigitalSorcerer4225 closed 11 months ago

DigitalSorcerer4225 commented 11 months ago

Anki crashes when clicking on the "Browse" button in the "Path" field on the TiddlyRemember configuration on anki.

Debug info: Anki 23.10.1 (fac9e0ee) Python 3.9.15 Qt 6.6.0 PyQt 6.6.0 Platform: Linux-6.5.6-76060506-generic-x86_64-with-glibc2.35 Flags: frz=True ao=True sv=3 Add-ons, last update check: 2023-11-13 15:34:29 Add-ons possibly involved: ⁨TiddlyRemember⁩

Caught exception: Traceback (most recent call last): File "~/.local/share/Anki2/addons21/60456529/settings.py", line 207, in browse_for_wiki mode = QFileDialog.ExistingFile AttributeError: type object 'QFileDialog' has no attribute 'ExistingFile'

I tried to reinstall the add-on but still the problem persists.

sobjornstad commented 11 months ago

I just updated to the latest version and am not getting this error. I'm also able to sync successfully. My versions in Help > About match those listed in your traceback.

image

If you look at the PLUGIN_VERSION line at the top of util.py in the add-on's folder, do you have 1.3.4?

DigitalSorcerer4225 commented 11 months ago

Thanks for replying.

Yes, I do.

In the util.py of the add-on's folder, I have 1.3.4 for the PLUGIN_VERSION:

DEFAULT_FILTER = '[type[text/vnd.tiddlywiki]] [type[]] +[!is[system]]' PLUGIN_VERSION = "1.3.4" COMPATIBLE_TW_VERSIONS = [ "", "1.2.2", "1.2.3", "1.3.0", "1.3.1", "1.3.2", "1.3.3", "1.3.4" ]

Edit 1:

To add more information, the problem happens on Anki v23.10.1 -.deb package. The same problem (i.e., Anki crashes when clicking on the "Browse" button in the "Path" field on the TiddlyRemember configuration on anki) happens on the flatpak version of Anki :

Debug info: Anki 23.10 (51a10f09) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0 Platform: Linux-6.5.6-76060506-generic-x86_64-with-glibc2.38 Flags: frz=True ao=True sv=3 Add-ons, last update check: 2023-11-13 18:37:59 Add-ons possibly involved: ⁨TiddlyRemember⁩

Caught exception: Traceback (most recent call last): File "/home/echoes/.var/app/net.ankiweb.Anki/data/Anki2/addons21/60456529/settings.py", line 207, in browse_for_wiki mode = QFileDialog.ExistingFile AttributeError: type object 'QFileDialog' has no attribute 'ExistingFile

I also deleted all other plugins but it still throws the error. One thing to note though is that it doesn't throw the error on Anki v2.1.66 (and probably much earlier versions).

Edit 2

I just updated to the latest version and am not getting this error. I'm also able to sync successfully

I was also able to sync successfully on Anki v.23.10.1. It's just that anki throws an error when I try to select a tiddlywiki html file, i.e., clicking on the "Browse" button" on the path field on the add-on's configuration:

2023 11 14 Tue 11-26-21

Edit 3

For people who has the same problem: while awaiting for a proper fix, I found a temporary solution for Anki v.23.10.1 - instead of clicking browse to find your tiddlywiki.html, you can just manually type in the location of your tiddlywiki.html and the traceback wouldn't appear. You can then sync your tiddlyremember entries successfully.

sobjornstad commented 11 months ago

Sorry, I think I did not read your original bug report correctly and thought you were saying this was happening on sync, rather than on clicking the browse button. :man_facepalming: I was able to repro this now, I guess Qt 6 changed the location of this enum and for some reason the type-checker thinks the old location is still valid.

sobjornstad commented 11 months ago

Fixed in latest release