taylormitchell / ankify_roam

A command-line tool which brings flashcards created in Roam to Anki.
MIT License
36 stars 6 forks source link

Changing the deck deck and on a per-note basis using tags in Roam, has stopped working for me #45

Closed Etyre closed 2 years ago

Etyre commented 2 years ago

[Unlike the other issue I logged earlier today, this one regards some core functionality.]

Recently, the functionality where I can use a tag to select which specific deck cards get created in is broken.

Cards that are supposed to go to my "Spaced Learning Projects::Skill Chunks", are instead going into my default "Daily review::Incremental Reading" deck.

This was working just fine on 2021-12-10, which is the date that the last card was added to "Spaced Learning Projects::Skill Chunks" from Roam.

I migrated computers recently, so I did a quick check if that was part of the problem. I deleted some of the offending cards from Anki, synced to anki web, went over to my old computer, synced Anki there, and then ran ankify_roam, to see if that worked.

It did!

Also the terminal outputs while ankify_roam was running, was different across my two machines.

For my current laptop (the one which was putting the cards in the wrong deck), there's this code...

2022-02-10 10:21:06,086 - INFO - Setting up Ankifier
2022-02-10 10:21:06,256 - INFO - Loading Roam Graph
2022-02-10 10:21:09,359 - ERROR - Unknown problem parsing block '4OMViq_gR' :(. Skipping
2022-02-10 10:21:16,033 - INFO - Found 567 blocks with ankify tag

...while on my old machine (where I don't have this problem), it looks like this...

2022-02-10 11:34:55,901 - INFO - Setting up Ankifier
2022-02-10 11:35:47,050 - INFO - Loading Roam Graph
2022-02-10 11:36:13,874 - INFO - Fetching blocks to ankify
2022-02-10 11:36:14,213 - INFO - Ankifying 567 blocks

(In both cases, there are 21 blocks that can't be turned into anki notes "for unknown reasons", but I'm leaving that out right now, to avoid clutter.)

This makes me think that I'm running an older version of ankify_roam on my old machine and a newer version on my new machine, and the newer version has a bug which broke the "tagging for deck assignment" feature.

Etyre commented 2 years ago

l'm still having this issue, even with the most recent version (79cec1fdf5ac1ec74a9c40c13fd9cae9443c1018).

Which commit did you think would solve this?

Etyre commented 2 years ago

Ok. After a couple of hours of debugging with a friend, I seem to have fixed this bug, by installing with pipx, as opposed to running from the git repository.

My old machine was similarly running from an installed version in my python directory, rather than the repository.

I have no idea why this made a difference.

taylormitchell commented 2 years ago

@Etyre Sorry to hear it was such a pain to get working =/. As far as I know, installing from pypi vs git repo should both work. Glad to hear you got it working though

Etyre commented 2 years ago

It's ok. I think this might have been a python version / python environment thing. That happens sometimes.