Skip to content

No calendars found #20

Description

@sbeaumont

Hi,

I'm trying out PyXA to extract calendar events, but it does not seem to work. I've tested print(PyXA.Application("Safari").front_window.current_tab.url) which works fine, so my PyXA install should be working.

app = PyXA.Application("Calendar") print(app.calendars())

leads to an empty list

<<class 'PyXA.apps.Calendar.XACalendarCalendarList'>[]>

despite me having a ton of calendars visible in the Calendar app. All my calendars are tied to categorties or accounts like iCloud and Google and "other".

I have tried to look in the docs, but can't find a reference to finding calendars in any other way.

Tried creating a new calendar, but that also does not work:

`Traceback (most recent call last):
File "(My project path)/test.py", line 9, in
new_calendar = app.new_calendar("PyXA Development")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "(My project path)/.venv/lib/python3.11/site-packages/PyXA/apps/Calendar.py", line 244, in new_calendar
self.calendars().push(new_calendar)
File "(My project path)/.venv/lib/python3.11/site-packages/PyXA/XABase.py", line 884, in push
self.xa_elem.get().addObject_(element.xa_elem)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'addObject_'

Process finished with exit code 1`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions