Open Ctrl-A-Del opened 2 years ago
Thanks for reporting. That is surprising. Do you have a repo link that I can refer to? Or the exact filename / full error message?
Here you go. I just did a test commit on my notes to reproduce the issue. This commit has a broken graph: https://gitlab.com/Ctrl-A-Del/pkm-zettelkasten/-/commit/79d57cc13366d4eec82eaab8b4b498849e1e48d7
I have a note called [[🖥️ Tech]] that accidentally had 2 spaces [[🖥️ Tech]] and that killed the graph.
I've come up with the same issue, and I found that it's probably caused by trying to split two spaces which may produce a null element.
6:52:00 AM: Traceback (most recent call last):
6:52:00 AM: File "__site/convert.py", line 34, in <module>
6:52:00 AM: nodes[doc_path.abs_url] = doc_path.page_title
6:52:00 AM: File "/opt/build/repo/__site/utils.py", line 209, in page_title
6:52:00 AM: [
6:52:00 AM: File "/opt/build/repo/__site/utils.py", line 210, in <listcomp>
6:52:00 AM: item if item[0].isupper() else item.title()
6:52:00 AM: IndexError: string index out of range
In 208-213 of utils.py
title = " ".join(
[
item if item[0].isupper() else item.title()
for item in self.old_path.stem.split(" ")
]
).replace('"', r"\"")
Hi Peter,
I just had an issue where the graph view was broken on all pages due to some new notes I uploaded. It took me some time to figure out, that this happened because I accidentally had two spaces in a row in a file name, like so: " ". Obviously, the fix on my side was just to remove the unnecessary space. However, I still wanted to give you the info.
It seems like this resulted in some errors when decoding the URL for the graph_data.