Error from Templater when using icalBuddy

I have been battling with this error for quite some time, and am now hoping to get some help from the community’s wisdom… Any suggestion is greatly appreciated.

What I’m trying to do

I want to implement this blog’s process, and use Templater to create subsections for each of my calendar meetings in my daily notes. The approach discussed used terminal tool icalBuddy and the user functions in Templater to achieve this.

Things I have tried

I have successfully:

  • installed icalBuddy,
  • run the user function content in my terminal and get desired results,
    Screenshot 2023-03-21 at 4.03.30 PM
  • fixed a number of other errors using Obsidian Console.

But now I am stuck with an " Error: spawn /usr/local/bin EACCES" error that I cannot solve. I know that this means that Obsidian is denied access to the folder, and I have granted full disk access to Obsidian and terminal (not sure if this is relevant but I did it because I am out of solutions). I have also tried the chmod and chown commands in various versions, but nothing seems to work.

(I know there are several posts on syncing google calendar events to Obsidian daily notes and they work quite well, but I have a work outlook calendar so have to use icalBuddy.)

Here is a screenshot of the error message:
Screenshot 2023-03-21 at 4.02.54 PM

Here are screenshots of my Templater settings and definitions, and my function call in the daily note template:

Screenshot 2023-03-21 at 4.02.59 PM

Again, any direction and suggestion is welcomed and greatly appreciated!!

That error messages seems a little incomplete as it refers to a folder, and not the actual program/script it should run. This makes me wonder whether there is something odd about the location of the icalBuddy program.

Is it located in the /usr/local/bin folder? Is it even this program the script is complaining about?

Could you do the following commands within terminal, and report back on the result:

ls -ld /usr /usr/local /usr/local/bin /usr/local/bin/icalBuddy
which icalBuddy
type -a icalBuddy

This will report the file access related to the path in question, and tell us where your icalBuddy is installed.

1 Like

These are the results:

drwxr-xr-x@  11 root      wheel    352 Dec  2 06:37 /usr
drwxr-xr-x+  20 daisyzhu  wheel    640 Mar 21 11:00 /usr/local
drwxrwxrwx  433 daisyzhu  wheel  13856 Mar 29 14:09 /usr/local/bin
lrwxr-xr-x    1 daisyzhu  wheel     43 Mar 21 19:22 /usr/local/bin/icalBuddy -> ../Cellar/ical-buddy/1.10.1_1/bin/icalBuddy
icalBuddy is /usr/local/bin/icalBuddy
icalBuddy is /usr/local/bin/icalBuddy

Thank you so much for helping out!

Ok, so that is a symbolic link to another place. Do you have access to that place as well? The ones you’ve listed seems to be OK.

Now you need to try:

cd /usr/local
ls -ld Cellar Cellar/ical-buddy Cellar/ical-buddy/1.10.1_1 Cellar/ical-buddy/1.10.1_1/bin Cellar/ical-buddy/1.10.1_1/bin/icalBuddy

Does all of these also list a good file access?

1 Like

This is what I got:

drwxrwxr-x  100 daisyzhu  admin    3200 Mar 21 15:22 Cellar
drwxr-xr-x    3 daisyzhu  admin      96 Mar 21 19:22 Cellar/ical-buddy
drwxr-xr-x    8 daisyzhu  admin     256 Mar 21 19:22 Cellar/ical-buddy/1.10.1_1
drwxr-xr-x    3 daisyzhu  admin      96 Oct 14  2019 Cellar/ical-buddy/1.10.1_1/bin
-r-xr-xr-x    1 daisyzhu  admin  151368 Oct 14  2019 Cellar/ical-buddy/1.10.1_1/bin/icalBuddy

It’s looking like they all list good file access? (sorry I have very limited command line knowledge)

I’m almost sorry to say, that this looks good. So that indicates that your error is somewhere else. But where?!

Looking through your previous explanation, thinking…


This is not correct!!! Try emptying out this field. It should have some value like /bin/bash (or be empty), but having /usr/local/bin is just wrong. And that also explains the strange error message as you shouldn’t try to spawn a folder like /usr/local/bin.

So either just empty it, and see what happens. Or try /bin/bash, and see if that works, and if that doesn’t work either, try doing echo $SHELL in your terminal and copy that value into this field in Settings > Templater > Shell binary location.

1 Like

I think my initial problem was solved!!! Thank you so much!!!

I changed the shell binary location to /bin/bash and revised the icalBuddy command to be /usr/local/bin/icalBuddy. Now I am getting a different error message (progress!) saying “No calendars”. I tried multiple different calendars and got the same error. Meanwhile, the icalBuddy command works completely fine in the terminal.

Screenshot 2023-03-31 at 4.21.08 PM

Appreciate your help if you happen to know what this new error is about. Either way, I will be doing some digging on my own, and thank you sooooo much for helping. I would’ve never figured it out myself.

1 Like

Looks like I now have this problem: Calendar permission is not requested on MacOS (Ventura) - #3 by lielu, which has a solution posted.

Declaring problem solved. Thank you!!!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.