Skip to content

Random empty results from get_flights() during polling #109

Closed

Description

@Bkk20

When I repeatedly call get_flights() (e.g. every 40 seconds), the function behaves inconsistently:

Sometimes it returns a full list of flights (100+ entries)
Other times it returns an empty list ([]) without any error
After a few seconds, it works again

This happens randomly and is not tied to any specific airline or parameter.

What I already checked
-Same request parameters are used every time
-No exceptions are thrown when the result is empty
-Increasing delay does not fully prevent the issue
-The issue appears even when everything is stable on my side
-Additional observation

The library often prints this warning:

failed to decode Content-Encoding='gzip'
(Not a gzipped file ...)

However, this warning also appears when data is successfully returned, so it does not seem to fully break the request.

Activity

  1. JeanExtreme002 commented on Aug 19, 2026

    @JeanExtreme002
    Owner

    This should be fixed now, both parts of it.

    The empty lists came from FR24's load balancer: one of the feed backends was answering 200 with a valid envelope but no flights, and the AWSALB cookie pinned your session to it. #111 makes get_flights() drop that cookie and retry when it sees zero flights with full_count > 0, so you land on a healthy backend. Shipped in 1.5.2.

    The gzip warning was harmless — curl_cffi had already decompressed the body — and it's down to DEBUG since 1.5.3.

    Give 1.5.3 a try and reopen if you still see it.

  2. Bkk20 commented on Aug 19, 2026

    @Bkk20
    Author

    Works! Nice! Thank you!

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