Pymavlink/ errors : WIND_COV

I’m working on a script to build some flights scenarios using Python. I’m using SITL+Mavproxy to tests this script before having too many “real” crashes :grinning: :grinning:
Here’s below a part of this script:

# Set up variables for wind and control
wind_speed = 5.0
wind_direction = 180.0
desired_pitch = 30.0
desired_roll = 25.0

# Main loop
while True:
    # Retrieve wind information from the autopilot
    msg = master.recv_match(type='WIND_COV', blocking=True)
    wind_speed = msg.wind_speed
    wind_direction = msg.wind_direction

The error message

^CTraceback (most recent call last):
  File "/home/scripts/./", line 126, in <module>
    msg = master.recv_match(type='WIND_COV', blocking=True)
  File "/home/.local/lib/python3.10/site-packages/pymavlink/", line 524, in recv_match
  File "/home/.local/lib/python3.10/site-packages/pymavlink/", line 338, in select
    (rin, win, xin) =[self.fd], [], [], timeout)

Due to this error message, I checked in, and I don’t understand what’s going wrong in my code:

def recv_match(self, condition=None, type=None, blocking=False, timeout=None):
        '''recv the next MAVLink message that matches the given condition
        type can be a string or a list of strings'''
        if type is not None and not isinstance(type, list) and not isinstance(type, set):
            type = [type]
        start_time = time.time()
        while True:
            if timeout is not None:
                now = time.time()
                if now < start_time:
                    start_time = now # If an external process rolls back system time, we should not spin forever.
                if start_time + timeout < time.time():
                    return None
            m = self.recv_msg()
            if m is None:
                if blocking:
                    for hook in self.idle_hooks:
                    if timeout is None:
                return None
            if type is not None and not m.get_type() in type:
            if not evaluate_condition(condition, self.messages):
            return m
def select(self, timeout):
        '''wait for up to timeout seconds for more data'''
        if self.fd is None:
            return True
            (rin, win, xin) =[self.fd], [], [], timeout)
        except select.error:
            return False
        return len(rin) == 1

If someone has an idea, many thanks