# Pymavlink: Error 10035 when trying to read from UDP port on windows 10

**URL:** https://discuss.bluerobotics.com/t/pymavlink-error-10035-when-trying-to-read-from-udp-port-on-windows-10/15805
**Category:** Blue Robotics Software
**Tags:** pymavlink
**Created:** [January 11, 2024, 3:38pm UTC](https://discuss.bluerobotics.com/t/pymavlink-error-10035-when-trying-to-read-from-udp-port-on-windows-10/15805 "2024-01-11T15:38:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bob4](https://avatars.discourse-cdn.com/v4/letter/b/77aa72/32.png) [@bob4](https://discuss.bluerobotics.com/u/bob4)
#### Post date: [January 11, 2024, 3:38pm UTC](https://discuss.bluerobotics.com/t/pymavlink-error-10035-when-trying-to-read-from-udp-port-on-windows-10/15805/1 "2024-01-11T15:38:09Z")

</div>

I’ve been trying to set up one of the examples from the pymavlink docs  
[https://www.ardusub.com/developers/pymavlink.html](https://www.ardusub.com/developers/pymavlink.html)

specifically, this bit of code:

```auto
import time
from pymavlink import mavutil

master = mavutil.mavlink_connection('udpin:0.0.0.0:14550')
print("Listening for heartbeat")
master.wait_heartbeat()
print("Heartbeat found.")

```

The program starts listening for heartbeat, but never gets past that point.

QGroundControl and Mission Planner can establish a connection without issues.

Using a debugger I found that at one point in the process of reading from the UDP Port (specifically in [mavutil.py](https://github.com/ArduPilot/pymavlink/blob/master/mavutil.py), in the recv() function at line 1082, the program encounters the following error: `BlockingIOError(10035, 'A non-blocking socket operation could not be completed immediately`

I can only produce this issue on the Windows 10 PC at my workstation.  
It works fine on my Ubuntu 22.04 PC and another Windows 10 PC from my employer that should have a near identical setup (including the same mandatory firewall/AV Suite).

Any kind of suggestions on how to approach investigating this issue would be most welcome.

---

<div class="post-metadata">

### Author: ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)
#### Post date: [January 15, 2024, 1:10am UTC](https://discuss.bluerobotics.com/t/pymavlink-error-10035-when-trying-to-read-from-udp-port-on-windows-10/15805/2 "2024-01-15T01:10:02Z")

</div>

Hi @bob4,

A couple of questions for clarification:

1. Are you trying to do this while some other software is already connected to that port?
2. What MAVLink endpoints do you have configured in your vehicle’s onboard computer?

It may help to set up an additional MAVLink endpoint specifically for Pymavlink to connect to.

---

<div class="post-metadata">

### Author: ![bob4](https://avatars.discourse-cdn.com/v4/letter/b/77aa72/32.png) [@bob4](https://discuss.bluerobotics.com/u/bob4)
#### Post date: [January 15, 2024, 1:53pm UTC](https://discuss.bluerobotics.com/t/pymavlink-error-10035-when-trying-to-read-from-udp-port-on-windows-10/15805/3 "2024-01-15T13:53:32Z")

</div>

Hi @EliotBR,

Thank you for your help. I appreciate how active you are in this community.

I have worked around the issue by not using this particular computer for testing pymavlink scripts, because the script has worked perfectly fine on every other PC I tested it on.  
It doesn’t seem to me like this niche issue is worth sinking much more time into, unless other people start reporting the same.

Here is the info you requested:

1. The issue happens regardless of whether there is other software connected to the ROV.  
I tested it by rebooting the computer to make sure nothing was running, and starting the script.

2. I did set up an additional MAVLink Endpoint, but having the script connect to that one does not seem to change the outcome.

I do recall QGroundControl displaying an error message in situations where it was connected to the ROV while I launched the script. The script failed as usual, but QGroundControl also malfunctioned.I’m being vague because I couldn’t reproduce the behavior while writing this answer and don’t remember the exact error message.

---

<div class="post-metadata">

### Author: ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)
#### Post date: [January 16, 2024, 2:36am UTC](https://discuss.bluerobotics.com/t/pymavlink-error-10035-when-trying-to-read-from-udp-port-on-windows-10/15805/4 "2024-01-16T02:36:39Z")

</div>

> [@bob4](#):
>
> I appreciate how active you are in this community.

Thanks! It is part of my role at Blue Robotics, and I really enjoy being part of a company that cares about building up and guiding the community around our industry.

Do feel free to post in the #Feedback and Suggestions category if there’s something you think we could be doing better, or that you’d like to see more/less of 🙂

> [@bob4](#):
>
> It doesn’t seem to me like this niche issue is worth sinking much more time into, unless other people start reporting the same.

Fair enough. Good to hear you’ve managed to work around the issue for yourself, and thanks for providing some extra info in case it’s relevant to others who come along later 🙂
