quickadd: [BUG] More info to debug "Could not create file with template. Maybe '${templatePath}' is an invalid template path? received for valid template path"
Describe the bug It would be helpful to have more information in the error message:
Could not create file with template. Maybe '${templatePath}' is an invalid template path?
What I’m doing
Following your video: https://youtu.be/gYK3VDQsZJo?t=788
Background
I’m getting this message for a file that definitely exists:

My file template definitely exists, and Templater is definitely running - so I’m struggling to know what to do next.
I see in the code that there is an exception object:
catch (e) {
log.logError(`Could not create file with template. Maybe '${templatePath}' is an invalid template path?`);
return null;
}
Is there any possibility that the text of the exception could be included in the error message please?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (4 by maintainers)
Commits related to this issue
- Second attempt at fixing Templater update breaking QuickAdd templates For #111 and #109 — committed to chhoumann/quickadd by chhoumann 3 years ago
In a sense, yes. But the problem is that the error-message is misleading as it points to an error with the template instead of the filename of the new note.
🎉🎉🎉🎉🎉🎉
Hooray - thank you very much indeed!
quickadd “0.4.8” and templater “1.9.2” work fine for creating new files.
I’ll pop a message in the Obsidian Discord templater thread, where someone else was asking about what may be the same problem.
Hey! I’ve found what seems to be a fix (after lots of testing). Can you confirm? 😃
Thank you!
Seems I was a little unlucky picking today to start learning about quickadd and templater - but it’s fine, there’s plenty of other Obsidian stuff to be discovering!
Hi, sorry for commenting on a closed ticket, but this particular error-message also appears when using non-legal characters as a title/filename, such as a questionmark (?) on Windows-machines.
Would you rather see a separate ticket for this?