"odd length text property list" issue with `org-roam-find-node`

Emacs

GNU Emacs 28.0.50 (build 1, x86_64-w64-mingw32) of 2021-01-15

Doom

Doom emacs v21.12.0-alpha HEAD → develop b4cc1c84 2021-11-07 01:53:17 +0100
Doom core v3.0.0-alpha HEAD → develop b4cc1c84 2021-11-07 01:53:17 +0100

Org-Roam

2.1.0

Issue

Whenever I call org-roam-find-node - no matter if via Evil or M-x the error-message is issued in the minibuffer and nothing happens.
So basically I can’t find any node.

Strangely, the following commands work just fine:

  • org-roam-ref-find
  • org-roam-dailies-goto...
  • org-roam-node-random

Since without the missing functionality, Org-Roam is rendered nearly useless, you can feel my despair, right?

Thank you very much in advance for your time and support,
Jochen

Do you have a backtrace?

Thanks for your immediate reply.
What exactly do you mean?
The Messages buffer only shows one line of entry (as it reads in the title).

Other than that, there are follow-up errors like this one:
condition-case: Error in a Doom startup hook: find-file-hook, org-roam-db-autosync--setup-file-h, (doom-hook-error org-roam-find-file-hook +org-roam-open-with-buffer-maybe-h (error "Odd length text property list"))

Does that help or what else do you want me to provide?

Kind regards,
Jochen

No… Turn on toggle-debug-on-error. Then you get a very long list error that traces the chain of functions.

Looking at the error, though, you might have a file/headline that does not set the property drawer correctly.

Other than that, it looks like a Doom issue?

Backtrace would usually give you more clue

Ahh, sure, right:

Debugger entered--Lisp error: (error "Odd length text property list")
  read()
  #f(compiled-function (connection) "Parse well-formed output into an s-expression." #<bytecode -0x8bb9c7dde3ffbb>)(#<emacsql-sqlite-connection emacsql-sqlite-connection-344611c>)
  apply(#f(compiled-function (connection) "Parse well-formed output into an s-expression." #<bytecode -0x8bb9c7dde3ffbb>) #<emacsql-sqlite-connection emacsql-sqlite-connection-344611c> nil)
  emacsql-parse(#<emacsql-sqlite-connection emacsql-sqlite-connection-344611c>)
  #f(compiled-function (connection sql &rest args) "Send SQL s-expression to CONNECTION and return the results." #<bytecode 0xfd7fff76a2d0b03>)(#<emacsql-sqlite-connection emacsql-sqlite-connection-344611c> "SELECT\n  id,\n  file,\n  \"level\",\n  todo,\n  pos,\n  p...")
  apply(#f(compiled-function (connection sql &rest args) "Send SQL s-expression to CONNECTION and return the results." #<bytecode 0xfd7fff76a2d0b03>) #<emacsql-sqlite-connection emacsql-sqlite-connection-344611c> "SELECT\n  id,\n  file,\n  \"level\",\n  todo,\n  pos,\n  p...")
  emacsql(#<emacsql-sqlite-connection emacsql-sqlite-connection-344611c> "SELECT\n  id,\n  file,\n  \"level\",\n  todo,\n  pos,\n  p...")
  apply(emacsql #<emacsql-sqlite-connection emacsql-sqlite-connection-344611c> "SELECT\n  id,\n  file,\n  \"level\",\n  todo,\n  pos,\n  p..." nil)
  org-roam-db-query("SELECT\n  id,\n  file,\n  \"level\",\n  todo,\n  pos,\n  p...")
  org-roam-node-list()
  org-roam-node-read--completions()
  org-roam-node-read(nil nil)
  org-roam-node-find()
  funcall-interactively(org-roam-node-find)
  call-interactively(org-roam-node-find nil nil)
  command-execute(org-roam-node-find)

I don’t use properties (I would say) at all, and never had.

Does that help?
I, btw. checked for path and other emacsql and sqlite dependancies.

If you are on V2, IDs are in the property drawer, you would be using it. If not, then you are on V1…

This backtrace does not tell me much, unfortunately.

If you are on V2, it’s probably useful to see if you have accidentally removed any part of properties in your recent Org files.

Other than this, I can’t tell you much more. It looks to be rather a Doom issue. It might be quicker if you asked their forum…

I’m definitely on V2 (see above, 2.1.0).

Puh, how will I learn about what part of properties might be missing.
What I could do though is

  • Moving all org-files to another folder
  • Deleting the org-roam.db
  • Creating some org-files
  • See if the error persists

What do you think of that?

Btw: I had an issue with copy&pasting text with Umlaute (äöü and the like). Doom then changed the file encoding to RAW and I needed to set the encoding generally to UTF-8:

;; Coding-System Stackoverflow questions: 2901541
  (set-language-environment 'utf-8)
  (setq locale-coding-system 'utf-8)
  (set-default-coding-systems 'utf-8)
  (set-terminal-coding-system 'utf-8)
  (set-selection-coding-system
    (if (eq system-type 'windows-nt)
        'utf-16-le  ;; https://rufflewind.com/2014-07-20/pasting-unicode-in-emacs-on-windows
      'utf-8))
  (prefer-coding-system 'utf-8)

What are your thoughts about that?

I think that’s a good idea.
We don’t know what the error really means and there is little clue at the moment.

Ha, deleting the org-roam.db already got rid of the issue and I can resume working with org-roam-find-node.
Thank you again for your immediate support and have a great day.

1 Like