Skip to content

Async API Quick start does not work #661

@usbpc

Description

@usbpc

I tried to follow the Quick Start in the documentation for the Async API .

I just copied the example 1:1 and am getting this error:

/home/user/dev/caldav-ics-proxy/main.py:5: RuntimeWarning: coroutine 'get_davclient' was never awaited
  async with aio.get_async_davclient() as client:
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Traceback (most recent call last):
  File "/home/user/dev/caldav-ics-proxy/main.py", line 15, in <module>
    asyncio.run(main())
    ~~~~~~~~~~~^^^^^^^^
  File "/usr/lib/python3.14/asyncio/runners.py", line 204, in run
    return runner.run(main)
           ~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.14/asyncio/runners.py", line 127, in run
    return self._loop.run_until_complete(task)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.14/asyncio/base_events.py", line 719, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/home/user/dev/caldav-ics-proxy/main.py", line 5, in main
    async with aio.get_async_davclient() as client:
               ~~~~~~~~~~~~~~~~~~~~~~~^^
TypeError: 'coroutine' object does not support the asynchronous context manager protocol (missed __aexit__ method)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions