votes up 1

can't compare offset-naive and offset-aware datetimes

Package:
Exception Class:
TypeError

Raise code

if isinstance(start, datetime) and isinstance(end, datetime):
            if (
                start.tzinfo is None
                and end.tzinfo is not None
                or start.tzinfo is not None
                and end.tzinfo is None
            ):
                raise TypeError("can't compare offset-naive and offset-aware datetimes")

        if absolute and start > end:
            end, start = start, end

        _start = start
        _end = end
        if isinstance(start, pendulum.DateTime):

NO FIXES YET

Just press the button and we will add solution
to this exception as soon as possible

* As many users press the button, the faster we create a fix

Add a possible fix

Please authorize to post fix