Calendar Lib stopped working on Ventura?

Has anyone else’s Calendar Lib stopped working? Now get this error whenever I run a script using it:

error “*** -[__NSPlaceholderArray initWithObjects:count:]:

I don’t know if this is because Calendar seems to have changed how it stores events now; no individual fgolders in ~/Library/Calendars for individual cals, just a lot of SQL files?

On further digging, it works fine for fetching events and deleting them but fails when events are attempted to be added; it seems like it’s failing on these lines:

set theResult to (theEvent's status())
if theResult is missing value then
	theDict's setObject:"none" forKey:"event_status"
	set theResult to theResult as integer
	theDict's setObject:(item (theResult + 1) of {"none", "confirmed", "tentative", "canceled"}) forKey:"event_status"
end if