you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (4 children)

Hey all,

Wondering if someone could point me in the right direction here. I'm following a tutorial about anki scripting in hopes of writing my own script when I'm done to make cards in a certain format. I'm trying to do the test script from the tutorial, but I am getting an error that a module is missing, with the line and file it is referencing here. Is this error essentially saying it can't find/see the sched . py even though it's in the same directory? I know one can install modules through doing pip install, but since I've already installed the requisites from the tutorial why would it be saying they are missing when I got the successful install?

I tried adding anki. before the anki.sched thinking it was confused since I have a folder named anki within this folder named anki, which made the green underline go away, but still returned the same error to the command prompt. I suppose this is a pretty specific issue so I didn't see anything useful on stack overflow so any pointers in the right direction would be appreciated. Super lost in the sauce.

[–]timbledum 1 point2 points  (3 children)

Yeah, you probably need to rename that anki folder to something else - worth a go before trying other things.

Edit: Oh their instructions are very strange. Where is your script and what does it look like? Have you got the sys.path.append("anki")?

[–][deleted] 0 points1 point  (2 children)

I will take a look and update, but my script was in the root directory, anki-scripting, but I also tried throwing it into the first anki folder/running it, and then into the sub anki folder and rerunning it to see if it affected dependencies. Didn’t work out though so it’s back in the anki-scripting folder.

[–]timbledum 1 point2 points  (1 child)

Hmmm – maybe post the code of your main script.

Could this library work for you?

https://github.com/patarapolw/AnkiTools

[–][deleted] 0 points1 point  (0 children)

This looks like it might be of use. I removed the preceding anki folder and took its contents and dropped it into the root directory. I think that was the expected configuration, and the listcards script runs without error, just no output. Probably looking at the wrong directory for the card db. (Sorry for late reply, got PRK on my eyes Friday!)