RTDE communication issue with python

Hello!
I’ve been using the UR10 with RTDE in python through the following [library].

Several tests in a notebook give good results, but when run in a script that must execute other functions that take longer it often happens that the RTDE communication fails. In particular I get errors like this:

rtde ERROR - Lost some RTDE at 277.505 - 704.0000000000077 milliseconds since last package

(with different times) and finally the connection breaks and the client writes thousands of lines like this:

rtde ERROR - Unknown RTDE command type: 1

It seems as if the TCP expects a constant answer from python and if it doesn’t receive it it goes into error.

Since it’s a random error it’s hard to come up with a mwe, but if someone wants to look into it I can try to reproduce it.

Cheers and thanks in advance!