Open ghost opened 2 years ago
Both variants seem to work when I replicate this locally - that error appears to be caused by a syntax error. Is there more to your query block?
Try the command standalone in the console to check as well.
Unfortunately not. I was getting the error with the exact syntax copy-pasted from above (except for the path). Was totally stumped about it. I'll try again just to be sure. Thank you for your quick response.
What happened?
I was trying to get a file's contents within a dataview JS block but noticed some odd behavior. When trying to read the file asynchronously, the DVJS query resolves with the error below. This only happens when using
await
, but I was able to get around it usingPromise.then()
. See the JS for the version that works and the one that doesn't. Note that I tried using bothdv.io.load()
andapp.vault.read()
DQL
No response
JS
Dataview Version
0.5.42
Obsidian Version
0.15.9
OS
MacOS