How to make a robot to move with force mode on?

Hello, I am trying to apply admittance control to UR3e, and before that, I am trying following tutorial ([Universal Robots - URScript: Dynamic Force Control]) with python3 and ur_rtde ([Introduction — ur_rtde 1.5.0 documentation]). Following is the code i made:

import time
import threading
import rtde_control
import rtde_receive

rtde_c = rtde_control.RTDEControlInterface("robot_ip")
rtde_r = rtde_receive.RTDEReceiveInterface("robot_ip")

amp = 0.1
init_q = [pi/2, -pi/2, pi/2, -pi/2, -pi/2, pi/2]

DT = 0.01

def fmode():
    while True:

rtde_c.moveJ(init_q, .5, .5)

global fm
fm = threading.Thread(target=fmode)
fm.daemon = True

init_pos = rtde_r.getActualTCPPose()

print("main start")


What I tried to do is make the robot’s end-effector move to the position that is 0.1 m away from the original position in x-direction, then return to the original position while forcemode is activated. However, the robot didn’t move even though “main start” was printed. What is the problem and how can I make the robot to move?

※ I replaced ‘sync()’ from tutorial to ‘time.sleep(DT)’ because I don’t know the namespace of the ‘sync()’. Is this caused the problem? if that is true, what could be the namespace of the ‘sync()’?

For anyone who might have same problem with me, the problem is data type of the input for rtde_c.moveL (I forgot to write moveL as rtde_c.moveL) After I made those input to list (ex: [init_pos[0]+0.1, init_pos[1], init_pos[2], init_pos[3], init_pos[4], init_pos[5]]) the robot moved as I intended.