anki-geo / ultimate-geography

Geography flashcard deck for Anki
https://ankiweb.net/shared/info/2109889812
Other
798 stars 79 forks source link

'CrowdAnki: Import from disk' will only select files, not directories #562

Closed werrent closed 1 year ago

werrent commented 2 years ago

I installed the CrowdAnki add-on, as directed in the Getting Started section of README.md.

I downloaded Ultimate_Geography_v5.0_EN.zip and unzipped it, as directed in the Getting Started section of README.md.

When I click 'CrowdAnki: Import from disk', it opens a 'Select Deck Directory' widget. At this point, I am stuck. This widget only permits me to select files. It will not permit me to select a directory. If I click on 'Ultimate Geography [EN].json' (before you ask, I did not ever attempt to import this file), or any other file, it will copy this name into the Name field. However, if it click 'Ultimate Geography [EN]' , which is a directory, it ignores it, except for allowing me to double-click to enter the directory. It will now permit me to select the directory

I am stuck. I need to import the whole 'Ultimate Geography [EN]' directory, but the GUI does not offer that specific functionality.

The Anki version information from the Help/About screen is: Version ⁨2.1.54 (b6a7760c)⁩ Python 3.9.10 Qt 5.15.2 PyQt 5.15.5

I am running on Ubuntu 18.04 KDE. I installed via flatpak (net.ankiweb.Anki/x86_64/stable) because this was the newest version I could find.

aplaice commented 2 years ago

I don't seem to be able to reproduce this.

(I've tested Anki 2.1.54 installed via flatpak on Ubuntu 22.04, on KDE (i.e. with the KDE desktop portal) and successfully imported Ultimate Geography.)

When you "navigate" to the Ultimate Geography [EN] directory, can you not just click "Select" in the lower-right? (Double-clicking on the directory in the file picker and clicking on "select" once you're "in" that directory have different effects.)

If you can't (because the layout is different etc.) or if it doesn't work, please do complain here!

Edit: (after an update??) I now have a different layout of the file dialog, but can still install a deck via CrowdAnki.

werrent commented 2 years ago

Thank you for your assistance. That does not work for me. If it matters, I have an "Open" and a "Cancel" button, but not a "Select" button. To answer your question, if I highlight the directory and then click "Open", the chooser dialogue just enters the directory and waits

aplaice commented 2 years ago

I'm sorry that it doesn't work. :/

I strongly suspect that the issue is with "XDG desktop portals" which might vary between Ubuntu releases. When I have the time I'll try to test with Ubuntu 18.04 KDE (but probably not in the near future).

CrowdAnki on the non-flatpak version of Anki should, hopefully, allow importing without issues (if it doesn't then it's a very major issue...).

ohare93 commented 2 years ago

I was recently (6 months ago) on Kubuntu 18.04 with no issues with the plugin. Now on Kubuntu 21 still with no issues.

But yes, sounds like a strange local issue. Do you get the same import window when using one of the built in Anki import options?

aplaice commented 2 years ago

Do you get the same import window when using one of the built in Anki import options?

I understand the issue is that CrowdAnki needs to select a directory (the directory containing the deck.json and media/ subdir) rather than a file, so if the file selector dialog (provided via flatpak's portal) allows "selecting" files but (for some reason) doesn't allow "selecting" directories (only navigating to/"entering" them), Anki's built-in import will work correctly, but CrowdAnki's won't.

(It'd still be interesting to know if Anki's built-in import doesn't work.)

axelboc commented 1 year ago

Closing as it seems to be a local issue. Please give us an update if you figure it out. 😉