# Can't create new org-roam files because of issue \`(wrong-number-of-arguments (2 . 2) 1)\`

**URL:** <https://org-roam.discourse.group/t/cant-create-new-org-roam-files-because-of-issue-wrong-number-of-arguments-2-2-1/2241>\
**Category:** Troubleshooting\
**Created:** [November 23, 2021, 8:52pm UTC](https://org-roam.discourse.group/t/cant-create-new-org-roam-files-because-of-issue-wrong-number-of-arguments-2-2-1/2241 "2021-11-23T20:52:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jburkhard](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/jburkhard/32/252_2.png) [@jburkhard](https://org-roam.discourse.group/u/jburkhard)\
**Post date:** [November 23, 2021, 8:52pm UTC](https://org-roam.discourse.group/t/cant-create-new-org-roam-files-because-of-issue-wrong-number-of-arguments-2-2-1/2241/1 "2021-11-23T20:52:21Z")

</div>

### Preliminaries

- Emacs: GNU Emacs 28.0.50 mingw32 of 2021-01-15
- DOOM: v21.12.0-alpha
- Org-Roam: 2.1.0
- System OS: Windows11

### What I do

- The issue only occurs with the recent DOOM Version (but worked even this morning with the maybe very last iteration)
- Calling `org-roam-node-find`
- Put an unknown node-name (like `test-file`) and the below error occurs, but the following two examples work just fine
- Simply creating an Org file works (like with `browse-notes`) WORKING
- Creating an Org file with `org-roam-dailies-goto-tomorrow` WORKING
- The following error occurs:

```auto
Debugger entered--Lisp error: (wrong-number-of-arguments (2 . 2) 1)
  string-glyph-decompose("Die-Moral-von-der")
  #f(compiled-function (--cl-nonspacing-mark-p-- s) #<bytecode -0x1f0219cc1a0d1aa8>)(#f(compiled-function (char) #<bytecode -0xed4abfd6e3eb0bb>) "Die-Moral-von-der")
  #f(compiled-function (node) "Return the slug of NODE." #<bytecode -0xfa36eea0cc373b3>)(#s(org-roam-node :file nil :file-title nil :file-hash nil :file-atime nil :file-mtime nil :id nil :level nil :point nil :todo nil :priority nil :scheduled nil :deadline nil :title "Die-Moral-von-der" :properties nil :olp nil :tags nil :aliases nil :refs nil))
  apply(#f(compiled-function (node) "Return the slug of NODE." #<bytecode -0xfa36eea0cc373b3>) #s(org-roam-node :file nil :file-title nil :file-hash nil :file-atime nil :file-mtime nil :id nil :level nil :point nil :todo nil :priority nil :scheduled nil :deadline nil :title "Die-Moral-von-der" :properties nil :olp nil :tags nil :aliases nil :refs nil) nil)
  org-roam-node-slug(#s(org-roam-node :file nil :file-title nil :file-hash nil :file-atime nil :file-mtime nil :id nil :level nil :point nil :todo nil :priority nil :scheduled nil :deadline nil :title "Die-Moral-von-der" :properties nil :olp nil :tags nil :aliases nil :refs nil))
  #f(compiled-function (key default-val) #<bytecode 0x114c25a08f31c359>)("slug" nil)
  #f(compiled-function (md) #<bytecode 0x4ff1938f929f52d>)("${slug}")
  replace-regexp-in-string("\\${\\([^}]+\\)}" #f(compiled-function (md) #<bytecode 0x4ff1938f929f52d>) "${slug}.org" t t)
  org-roam-format-template("${slug}.org" #f(compiled-function (key default-val) #<bytecode 0x114c25a08f31c359>))
  org-roam-capture--fill-template("${slug}.org" t)
  org-roam-capture--target-truepath("${slug}.org")
  org-roam-capture--setup-target-location()
  org-roam-capture--prepare-buffer()
  org-capture-set-target-location(nil)
  #f(compiled-function (&optional goto keys) "Capture something.\n\\<org-capture-mode-map>\nThis will let you select a template from `org-capture-templates', and\nthen file the newly captured information. The text is immediately\ninserted at the target location, and an indirect buffer is shown where\nyou can edit it. Pressing `\\[org-capture-finalize]' brings you back to the previous\nstate of Emacs, so that you can continue your work.\n\nWhen called interactively with a `\\[universal-argument]' prefix argument GOTO, don't\ncapture anything, just go to the file/headline where the selected\ntemplate stores its notes.\n\nWith a `\\[universal-argument] \\[universal-argument]' prefix argument, go to the last note stored.\n\nWhen called with a `C-0' (zero) prefix, insert a template at point.\n\nWhen called with a `C-1' (one) prefix, force prompting for a date when\na datetree entry is made.\n\nELisp programs can set KEYS to a string associated with a template\nin `org-capture-templates'. In this case, interactive selection\nwill be bypassed.\n\nIf `org-capture-use-agenda-date' is non-nil, capturing from the\nagenda will use the date at point as the default date. Then, a\n`C-1' prefix will tell the capture process to use the HH:MM time\nof the day at point (if any) or the current HH:MM time." (interactive "P") #<bytecode 0x6f01de9c82e368e>)(nil "d")
  apply(#f(compiled-function (&optional goto keys) "Capture something.\n\\<org-capture-mode-map>\nThis will let you select a template from `org-capture-templates', and\nthen file the newly captured information. The text is immediately\ninserted at the target location, and an indirect buffer is shown where\nyou can edit it. Pressing `\\[org-capture-finalize]' brings you back to the previous\nstate of Emacs, so that you can continue your work.\n\nWhen called interactively with a `\\[universal-argument]' prefix argument GOTO, don't\ncapture anything, just go to the file/headline where the selected\ntemplate stores its notes.\n\nWith a `\\[universal-argument] \\[universal-argument]' prefix argument, go to the last note stored.\n\nWhen called with a `C-0' (zero) prefix, insert a template at point.\n\nWhen called with a `C-1' (one) prefix, force prompting for a date when\na datetree entry is made.\n\nELisp programs can set KEYS to a string associated with a template\nin `org-capture-templates'. In this case, interactive selection\nwill be bypassed.\n\nIf `org-capture-use-agenda-date' is non-nil, capturing from the\nagenda will use the date at point as the default date. Then, a\n`C-1' prefix will tell the capture process to use the HH:MM time\nof the day at point (if any) or the current HH:MM time." (interactive "P") #<bytecode 0x6f01de9c82e368e>) (nil "d"))
  (let ((+file-templates-inhibit t)) (apply fn args))
  +file-templates-inhibit-in-org-capture-a(#f(compiled-function (&optional goto keys) "Capture something.\n\\<org-capture-mode-map>\nThis will let you select a template from `org-capture-templates', and\nthen file the newly captured information. The text is immediately\ninserted at the target location, and an indirect buffer is shown where\nyou can edit it. Pressing `\\[org-capture-finalize]' brings you back to the previous\nstate of Emacs, so that you can continue your work.\n\nWhen called interactively with a `\\[universal-argument]' prefix argument GOTO, don't\ncapture anything, just go to the file/headline where the selected\ntemplate stores its notes.\n\nWith a `\\[universal-argument] \\[universal-argument]' prefix argument, go to the last note stored.\n\nWhen called with a `C-0' (zero) prefix, insert a template at point.\n\nWhen called with a `C-1' (one) prefix, force prompting for a date when\na datetree entry is made.\n\nELisp programs can set KEYS to a string associated with a template\nin `org-capture-templates'. In this case, interactive selection\nwill be bypassed.\n\nIf `org-capture-use-agenda-date' is non-nil, capturing from the\nagenda will use the date at point as the default date. Then, a\n`C-1' prefix will tell the capture process to use the HH:MM time\nof the day at point (if any) or the current HH:MM time." (interactive "P") #<bytecode 0x6f01de9c82e368e>) nil "d")
  apply(+file-templates-inhibit-in-org-capture-a #f(compiled-function (&optional goto keys) "Capture something.\n\\<org-capture-mode-map>\nThis will let you select a template from `org-capture-templates', and\nthen file the newly captured information. The text is immediately\ninserted at the target location, and an indirect buffer is shown where\nyou can edit it. Pressing `\\[org-capture-finalize]' brings you back to the previous\nstate of Emacs, so that you can continue your work.\n\nWhen called interactively with a `\\[universal-argument]' prefix argument GOTO, don't\ncapture anything, just go to the file/headline where the selected\ntemplate stores its notes.\n\nWith a `\\[universal-argument] \\[universal-argument]' prefix argument, go to the last note stored.\n\nWhen called with a `C-0' (zero) prefix, insert a template at point.\n\nWhen called with a `C-1' (one) prefix, force prompting for a date when\na datetree entry is made.\n\nELisp programs can set KEYS to a string associated with a template\nin `org-capture-templates'. In this case, interactive selection\nwill be bypassed.\n\nIf `org-capture-use-agenda-date' is non-nil, capturing from the\nagenda will use the date at point as the default date. Then, a\n`C-1' prefix will tell the capture process to use the HH:MM time\nof the day at point (if any) or the current HH:MM time." (interactive "P") #<bytecode 0x6f01de9c82e368e>) (nil "d"))
  org-capture(nil "d")
  org-roam-capture-(:node #s(org-roam-node :file nil :file-title nil :file-hash nil :file-atime nil :file-mtime nil :id nil :level nil :point nil :todo nil :priority nil :scheduled nil :deadline nil :title "Die-Moral-von-der" :properties nil :olp nil :tags nil :aliases nil :refs nil) :templates nil :props (:finalize find-file :call-location #<marker at 235 in 2021-11-24.org>))
  org-roam-node-find()
  #<subr funcall-interactively>(org-roam-node-find)
  apply(#<subr funcall-interactively> org-roam-node-find)
  funcall-interactively(org-roam-node-find)
  #<subr call-interactively>(org-roam-node-find nil nil)
  apply(#<subr call-interactively> (org-roam-node-find nil nil))
  explain-pause--wrap-call-interactively(#<subr call-interactively> org-roam-node-find nil nil)
  apply(explain-pause--wrap-call-interactively #<subr call-interactively> (org-roam-node-find nil nil))
  call-interactively(org-roam-node-find nil nil)
  command-execute(org-roam-node-find)

```

---

<div class="post-metadata">

**Author:** ![alanz](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/alanz/32/717_2.png) [@alanz](https://org-roam.discourse.group/u/alanz)\
**Post date:** [November 23, 2021, 8:54pm UTC](https://org-roam.discourse.group/t/cant-create-new-org-roam-files-because-of-issue-wrong-number-of-arguments-2-2-1/2241/2 "2021-11-23T20:54:24Z")

</div>

I have just hit this too, and generated basically the identical stack trace. After updating via melpa.

---

<div class="post-metadata">

**Author:** ![alanz](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/alanz/32/717_2.png) [@alanz](https://org-roam.discourse.group/u/alanz)\
**Post date:** [November 23, 2021, 8:55pm UTC](https://org-roam.discourse.group/t/cant-create-new-org-roam-files-because-of-issue-wrong-number-of-arguments-2-2-1/2241/3 "2021-11-23T20:55:34Z")

</div>

And I presume [(fix)node: fix org-roam-node-slug compatibility with Emacs 29.1 (#1982) · org-roam/org-roam@ae533fa · GitHub](https://github.com/org-roam/org-roam/commit/ae533fa3093a1fca2217c2e3e2d7d12d23122d2b) is the cause

---

<div class="post-metadata">

**Author:** ![jburkhard](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/jburkhard/32/252_2.png) [@jburkhard](https://org-roam.discourse.group/u/jburkhard)\
**Post date:** [November 23, 2021, 8:55pm UTC](https://org-roam.discourse.group/t/cant-create-new-org-roam-files-because-of-issue-wrong-number-of-arguments-2-2-1/2241/4 "2021-11-23T20:55:51Z")

</div>

Oook, that comes not unexpected, since I didn’t change anything in my config. Hhhm.

---

<div class="post-metadata">

**Author:** ![alanz](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/alanz/32/717_2.png) [@alanz](https://org-roam.discourse.group/u/alanz)\
**Post date:** [November 23, 2021, 9:19pm UTC](https://org-roam.discourse.group/t/cant-create-new-org-roam-files-because-of-issue-wrong-number-of-arguments-2-2-1/2241/5 "2021-11-23T21:19:18Z")

</div>

And can confirm that if I manually undo that edit in the `elpa/org-roam-20211123.1547` directory it works again for me.

---

<div class="post-metadata">

**Author:** ![jburkhard](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/jburkhard/32/252_2.png) [@jburkhard](https://org-roam.discourse.group/u/jburkhard)\
**Post date:** [November 24, 2021, 9:23am UTC](https://org-roam.discourse.group/t/cant-create-new-org-roam-files-because-of-issue-wrong-number-of-arguments-2-2-1/2241/6 "2021-11-24T09:23:05Z")

</div>

After my recent `doom upgrade` this morning, the issue is gone / resolved. Maybe they fixed it but I cannot tell since I didn’t check for the versioning today.  
Thank you so much for your input on that one, and have a great day,  
Jochen

---

<div class="post-metadata">

**Author:** ![JeffBrown](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/jeffbrown/32/254_2.png) [@JeffBrown](https://org-roam.discourse.group/u/JeffBrown)\
**Post date:** [November 24, 2021, 11:31pm UTC](https://org-roam.discourse.group/t/cant-create-new-org-roam-files-because-of-issue-wrong-number-of-arguments-2-2-1/2241/7 "2021-11-24T23:31:35Z")

</div>

Same thing happened to me, installing declaratively on NixOS. I “solved” it by removing org-roam from my configuration and installing it procedurally from within Emacs.

---

<div class="post-metadata">

**Author:** ![jethro](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jethro](https://org-roam.discourse.group/u/jethro)\
**Post date:** [November 25, 2021, 4:44am UTC](https://org-roam.discourse.group/t/cant-create-new-org-roam-files-because-of-issue-wrong-number-of-arguments-2-2-1/2241/8 "2021-11-25T04:44:33Z")

</div>

This has been fixed in master, sorry for the inconvenience.
