hans / obsidian-citation-plugin

Obsidian plugin which integrates your academic reference manager with the Obsidian editor. Search your references from within Obsidian and automatically create and reference literature notes for papers and books.
MIT License
1.04k stars 76 forks source link

Error in accessing literature notes in Citations plugin #223

Open Mozartismee opened 1 year ago

Mozartismee commented 1 year ago

Hello everyone,

I am a new user of Citations plugin on macOS and I am facing an issue. After setting the path to my .bib file and confirming that my references are being searched using ctr+shift+o, I selected a reference but encountered an error message:

"Unable to access literature note. Please check that the literature note folder exists, or update the Citations plugin settings."

I have double-checked the path to my .bib file and the settings, but I am still unable to locate the source of the problem. Can anyone kindly offer some help and guidance on how to resolve this issue?

Thank you in advance for your kind assistance.

The following are my citations setting and error prompt :

截圖 2023-03-27 上午1 17 32

<img width="1213" alt="截圖 2023-03-27 上

截圖 2023-03-27 上午1 07 27

午1 06 55" src="https://user-images.githubusercontent.com/108670929/227792525-8ab5fa3d-04cb-409a-a1fd-5dc0805bebd7.png">

截圖 2023-03-27 上午1 08 10 截圖 2023-03-27 上午1 08 20
orionpilot commented 1 year ago

Does your literature note folder "Reading notes" already exists? If not, it needs to be created first. Also, double check there are no accidental additional whitespaces in the folder name, as I can replicate this error message by doing that.

leandrocfg commented 1 year ago

Hi, Having the same problem. I've already created the "Reading notes" folder, but still doesn't work. I've tried a simplier .bib file, with just 2 entries. I can visualized them when selecting ctrl+shift+O or ctrl+shift+E, but no results after selecting the reference.

orionpilot commented 1 year ago

@leandrocfg Since you can see the references with the ctril-shift-O command, that tells me that the bib file + path is working fine. However, did you check that either the folder name in the file structure or the folder name in the plugin settings does not have an extra space i.e., Reading notes vs Reading notes? That is enough to cause this error message and it would not be super clear by just looking at the name in the settings.

leandrocfg commented 1 year ago

@orionpilot , I usually don't use spaces on folder or file names, additionally, I've copied the folder path from windows explorer and checked if there is an additional space at the end, and no, there isn't. I've also tried change slash for backslash, but without sucess (this doesn't seems to be a problem, given that the database path is working with the respective path copied from windows explorer)

orionpilot commented 1 year ago

@leandrocfg Good to have confirmed that an additional space is not the issue. You just said however that you copied the path from Windows Explorer. That would be an absolute path and I don't think the literature note folder accepts an absolute path like the citation database path does. If this is true for you, try using a relative path in that setting. If you are already using a relative path however, try making the directory blank. That way the should notes show up in the root directory of the vault. If having the literature note folder as blank works, then the issue has to be with how the folder was originally written, in some way.

leandrocfg commented 1 year ago

It worked using a relative path! Thanks!

PS.: leaving it blank didn't work, the folder was not created, nor any new note.

Mozartismee commented 1 year ago

Thank you, everyone! As you pointed out, I didn't place the library.bib file in the "Reading notes" folder. I appreciate your help in pointing out my small and ignorant mistake. Now, I can use "ctrl+shift+o/e" to import references into my Obsidian notes.

Here is the full path of where I stored the library.bib file and my citation settings. I hope this can help other beginners who may have the same issue as me in the future:

My Filepath : /Users/[your name]/Documents/Obsidian Vault/Reading notes Citation Settings :

截圖 2023-03-28 上午9 50 42
MackBlackburn commented 1 year ago

I get the error if I put the full path of the "Reading notes" directory, but it works if I just enter the string "Reading notes". I think it would be better if this field could handle full paths to avoid this confusion in the future.