Permission for Calender needed in Omnifocus?

Use a script for updating my calendar with Omnifocus tasks for a while now. I discovered that with Catalina it stopped working.

020-09-03 10:58:02 Execute an Works welAppleScript failed with script error: text-script:368:390: execution error: Calendar got an error: Can’t get calendar "OmniFocus". (-1728)

It works well in Script Debugger. Any suggestions to solve this. Already cleared all permissions.

This thread deals with permission issues:

Thanks @Bobby_Joe,
Thanks for your response. Should have mentioned that I already have seen this. Even tried the tccutil command to remove all permissions. Seems that I cannot give permission to KM for retrieving my agenda events.

Hmm maybe it's not a permission error? Could something have changed within Omnifocus in Catalina that broke the script? Just throwing out ideas here...

Try using the script in the Terminal osascript command.

Will try this but first will ask Rosemary Orchard if she discovers the same problem @peternlewis

@rosemaryorchard Hi Rosemary, i discovered that i have a problem with the script i use made by you of adding tasks from omnifocus. It won't access my calendar anymnore. Can you confirm that the script still works at your side ? Thanks in advance.

My error : execution error: Calendar got an error: Can’t get calendar "OmniFocus". (-1728)

Solved by installing Catalina again. It has asked now the permission for using my calendar