Oh yeah, here’s the path:
./wordtree.py input.txt --noentry --anki ~/Library/Application\ Support/Anki2/Dave/collection.anki2
Language set to default: es Spanish
Use --lang to change
Using frequency file: freq/es.xz
Loading anki database...
Connecting to database: /Users/dave/Library/Application Support/Anki2/Dave/collection.anki2
Error: unable to open database file
Failed to connect to database.
Make sure the filename is correct or try closing anki before proceeding.
Then when that didn’t work, I copied the database file to the same direcctory and tried it there.
Worth noting: I tried using /Users/dave/ instead of ~ for the home directory, as well as putting the path in single & double quotes. All gave the same result. I’m on Anki 2.1.65 at the moment. I haven’t tried upgrading yet.