JYC333 / Anki-Sync-to-Obsidian

3 stars 0 forks source link

OSError: [Errno 22] Message after using add-on #2

Open mmngtb opened 1 year ago

mmngtb commented 1 year ago

Hello,

New to Anki and Obsidian and I don't know why I keep on having an error message:

Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. When you've discovered the add-on that is causing the problem, please report the issue to the add-on author. Debug info: Anki 2.1.64 (581f82c5) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0 Platform: Windows-10-10.0.19045 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2023-06-04 19:12:10

Caught exception: Traceback (most recent call last): File "C:\Users\Michael Lopez\AppData\Roaming\Anki2\addons21\327710559\main.py", line 132, in sync sync_to_obsidian(browser) File "C:\Users\Michael Lopez\AppData\Roaming\Anki2\addons21\327710559\main.py", line 50, in sync_to_obsidian app_json = open( OSError: [Errno 22] Invalid argument: 'new?vault=my%20vault\.obsidian\app.json'

I believe I'm inputting the wrong ObsidianPath. Can you give me an example of what to type?

Thank you

soccerwithag commented 1 year ago

Same error here, on MacOS @JYC333

Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0 Platform: macOS-13.4-arm64-arm-64bit Flags: frz=True ao=True sv=3 Add-ons, last update check: 2023-06-12 12:12:18 Add-ons possibly involved: ⁨Sync to Obsidian⁩

Caught exception: Traceback (most recent call last): File "/Users/home/Library/Application Support/Anki2/addons21/327710559/main.py", line 132, in sync sync_to_obsidian(browser) File "/Users/home/Library/Application Support/Anki2/addons21/327710559/main.py", line 50, in sync_to_obsidian app_json = open( FileNotFoundError: [Errno 2] No such file or directory: '/Users/home/HomeVault/02-Brain/.obsidian/app.json'

soccerwithag commented 1 year ago

Changed my path to "/Users/home/HomeVault/" instead and received no error screen, but nothing changed in obsidian either

soccerwithag commented 1 year ago

Update, again, lol. I realized that the cards have to be selected in the browser for it to sync them. It works!

@mmngtb Try changing your path to the vault folder, wherever you have that on windows, instead of a folder within it. The .obsidian folder is a hidden folder there.

soccerwithag commented 1 year ago

Well fuck, does this not work with cloze cards?

Another error:

Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0 Platform: macOS-13.4-arm64-arm-64bit Flags: frz=True ao=True sv=3 Add-ons, last update check: 2023-06-12 12:12:18 Add-ons possibly involved: ⁨Sync to Obsidian⁩

Caught exception: Traceback (most recent call last): File "/Users/home/Library/Application Support/Anki2/addons21/327710559/main.py", line 132, in sync sync_to_obsidian(browser) File "/Users/home/Library/Application Support/Anki2/addons21/327710559/main.py", line 70, in sync_to_obsidian with open( FileNotFoundError: [Errno 2] No such file or directory: "/Users/home/HomeVault/Primary/Additions/Most common mononeuropathy in patients on dialysis (up to 1/3rd of pt's) = {{c1::carpal tunnel syndrome}}.md"

JYC333 commented 1 year ago

Yes, it only works with plain text.