kctekn / obsidian-TagsRoutes

This is a plugin for obsidian, to visualize files and tags as nodes in 3D graph.
MIT License
16 stars 2 forks source link

When I open the tag routes view, nothing shows. #10

Open Saauan opened 2 weeks ago

Saauan commented 2 weeks ago

Hello, I just installed the plugin to fool around with it. But when I open the tag routes view, only a blank page is shown. I tried to follow the installation instructions and videos carefully, but I don't understand what I'm doing wrong ? I'm using Obsidian on Linux btw.

kctekn commented 2 weeks ago

Have you clicked the ribbon button on the left to start the view? If you have done so, maybe you can press ctrl-shift-I(or maybe other key under linux? ) to show the debug panel , is there any error messages show there?

yakuzadave commented 2 weeks ago

I ran into this too on Windows (I can also test on my macOS instance of Obsidian if it helps). In the console output, I see this:

app.js:1 Failed to open view TypeError: _c.tags.forEach is not a function
    at eval (plugin:tags-routes:33699:86)
    at Map.forEach (<anonymous>)
    at TagRoutesView.buildGdata (plugin:tags-routes:33689:18)
    at TagRoutesView.onOpen (plugin:tags-routes:33939:23)
    at TagRoutesView.<anonymous> (app.js:1:1440884)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at app.js:1:236159
    at new Promise (<anonymous>)
    at v (app.js:1:235904)
    at t.open (app.js:1:1440741)
    at t.<anonymous> (app.js:1:2210563)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at a (app.js:1:235961)
kctekn commented 2 weeks ago

This seems to be an issue for tags in note frontmatter: I wrote a temporary version: added some debug information and it would can resolve the issue. Please try this version and provide the debug information if have any in the debug panel.

main.zip @yakuzadave @Saauan

  • Unzip to main.js and put it into your vault_directory/.obsidian/plugins/tags-routes, override the original one
yakuzadave commented 2 weeks ago

Awesome, thank you for looking into this. I'll try this out and let you know if I'm able to resolve the issue this way.

yakuzadave commented 2 weeks ago

Got a chance to test this morning and used your file (dropped in the existing plugin) and reloaded Obsidian and it looks like that did the trick. Snagged the debug logs too, so we could add it here:


file:  textgenerator/templates/default/simplify.md
plugin:tags-routes:33737 frontmatter:  Object
plugin:tags-routes:33735 Error occurred:  TypeError: cache.frontmatter.tags.forEach is not a function
    at eval (plugin:tags-routes:33728:34)
    at Map.forEach (<anonymous>)
    at TagRoutesView.buildGdata (plugin:tags-routes:33717:18)
    at TagRoutesView.onOpen (plugin:tags-routes:33989:23)
    at TagRoutesView.<anonymous> (app.js:1:1440884)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at app.js:1:236159
    at new Promise (<anonymous>)
    at v (app.js:1:235904)
    at t.open (app.js:1:1440741)
    at t.<anonymous> (app.js:1:2210563)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at a (app.js:1:235961)
plugin:tags-routes:33736 file:  textgenerator/templates/default/summarize.md
plugin:tags-routes:33737 frontmatter:  Object
plugin:tags-routes:33735 Error occurred:  TypeError: cache.frontmatter.tags.forEach is not a function
    at eval (plugin:tags-routes:33728:34)
    at Map.forEach (<anonymous>)
    at TagRoutesView.buildGdata (plugin:tags-routes:33717:18)
    at TagRoutesView.onOpen (plugin:tags-routes:33989:23)
    at TagRoutesView.<anonymous> (app.js:1:1440884)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at app.js:1:236159
    at new Promise (<anonymous>)
    at v (app.js:1:235904)
    at t.open (app.js:1:1440741)
    at t.<anonymous> (app.js:1:2210563)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at a (app.js:1:235961)
plugin:tags-routes:33736 file:  textgenerator/templates/default/rewrite.md
plugin:tags-routes:33737 frontmatter:  Object
plugin:tags-routes:33735 Error occurred:  TypeError: cache.frontmatter.tags.forEach is not a function
    at eval (plugin:tags-routes:33728:34)
    at Map.forEach (<anonymous>)
    at TagRoutesView.buildGdata (plugin:tags-routes:33717:18)
    at TagRoutesView.onOpen (plugin:tags-routes:33989:23)
    at TagRoutesView.<anonymous> (app.js:1:1440884)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at app.js:1:236159
    at new Promise (<anonymous>)
    at v (app.js:1:235904)
    at t.open (app.js:1:1440741)
    at t.<anonymous> (app.js:1:2210563)
    at app.js:1:237138
    at Object.next (app.js:1:237243)
    at a (app.js:1:235961)
plugin:tags-routes:33736 file:  textgenerator/templates/default/getTags.md
plugin:tags-routes:33737 frontmatter:  Object
plugin:tags-routes:33485 Tags routes: set current slot:  1
plugin:tags-routes:33493 it is the same, go to load effects
plugin:tags-routes:33495 load from slot:  1
plugin:obsidian-textgenerator-plugin:2098 attempting to get files 30
plugin:excalibrain:1 ExcaliBrain indexed 966 URLs from 9 unique hosts in 38 of 644 markdown files in 2.9 seconds

Based on some of the file paths, it may be having issues with my textgenerator templates for ollama and other GenAI stuff Grabbed the frontmatter from one of them just in case that helps.


promptId: rewrite
name: ✏️ Rewrite, Paraphrase
description: select a content and it will be rewriten.
author: Noureddine
tags: writing
version: 0.0.1
kctekn commented 2 weeks ago

Thank you for the detailed information! it is helpful. From it, we can figure out that it's an issue with parsing the tags—whether they are written in multiple lines or a single line. This fix will be added in the next release.

yakuzadave commented 2 weeks ago

That's great to hear. Got a chance to test it a bit more on my Vault that had a ton of notes and the visualizations look great (especially love the grouping of broken links or Excalidraw links). Keep up the great work. :)