Skip to content

Calendar.search broken with TypeError: Calendar.search() got multiple values for argument 'sort_keys' #587

@simon-ging

Description

@simon-ging

Hi,

In version 2.1.2 I get an error

        events_fetched = main_cal.search(
            start=now - timedelta(days=1, hours=2), end=now - timedelta(days=1)
        )
    events_fetched = main_cal.search(                                                                     
                     ^^^^^^^^^^^^^^^^             
  File ".../lib/python3.12/site-packages/caldav/collection
.py", line 1012, in search             
    return self.search(                                                                                   
           ^^^^^^^^^^^^                                                                                   
TypeError: Calendar.search() got multiple values for argument 'sort_keys'    

Downgrading to 2.0.1 fixes it

The search method code is a forest of try except if else, so it's not possible for me to see what's happening at first glance

Also I cannot create a reproducible example because it's my private calendar

Hope this still helps someone,

Best,

Simon

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