Using urscript form rtde

I am a mechanical engineering student working in a robotics company, and im trying to work with the function sendCustomScript() in python with the library ur_rtde.
This is my code:
import rtde_receive
import rtde_control

IP = XXXXX
port = XXXXX
rtde_r = rtde_receive.RTDEReceiveInterface(IP, port)
rtde_c = rtde_control.RTDEControlInterface(IP, port)
command1 = (
“movej(p[-0.2,-0.3,0.9,0,0,3.14], 0.1, 0.1, 0,0.1)\n”
)
rtde_c.sendCustomScript(command1)
print(“he hecho el primer movimiento”)
command2 = (
“movej(p[-0.2,-0.2,0.9,0,0,3.14]), 0.1, 0.1, 0,0.1)\n”
)
rtde_c.sendCustomScript(command2)
print(“he terminado”)

Desconectamos

rtde_c.stopScript()
rtde_r.disconnect()
rtde_c.disconnect()

The problem is the code moves to the first point but doesnt exits the first sendCustomScript so doesnt prints the next print. If anyone knows a solution it will be very helpful.