# URScript Error: freedrive\_mode takes exactly 0 arguments (2 given))

**URL:** <https://forum.universal-robots.com/t/urscript-error-freedrive-mode-takes-exactly-0-arguments-2-given/34037>\
**Category:** URScript\
**Created:** [May 2, 2024, 10:43pm UTC](https://forum.universal-robots.com/t/urscript-error-freedrive-mode-takes-exactly-0-arguments-2-given/34037 "2024-05-02T22:43:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam\_bourgault](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@sam\_bourgault](https://forum.universal-robots.com/u/sam_bourgault)\
**Post date:** [May 2, 2024, 10:43pm UTC](https://forum.universal-robots.com/t/urscript-error-freedrive-mode-takes-exactly-0-arguments-2-given/34037/1 "2024-05-02T22:43:33Z")

</div>

Hi all,  
I am trying to write a UR script program controlled by Python with RTDE that enables me to go from recording movements in freedrive mode to playing the recorded movements with a UR10e. I have got the freedrive\_mode working, but I can’t seem to specify the freeAxes parameter (and feature parameter) without the teaching pendant giving the error: freedrive\_mode takes exactly 0 arguments (2 given)

The line of code is:  
freedrive\_mode(freeAxes=[1,1,0,0,0,0], feature=p[0,0,0,0,0,0])

Here is a picture of the problem happening.

 ![Screenshot 2024-05-02 154132](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/6/6166f1ce050989a143fb934ff83d8ab0069525d3.jpeg)

Thanks for your help!  
sam

---

<div class="post-metadata">

**Author:** ![robin\_gdwl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/robin_gdwl/32/2676_2.png) [@robin\_gdwl](https://forum.universal-robots.com/u/robin_gdwl)\
**Post date:** [May 3, 2024, 7:43am UTC](https://forum.universal-robots.com/t/urscript-error-freedrive-mode-takes-exactly-0-arguments-2-given/34037/2 "2024-05-03T07:43:40Z")

</div>

What Polyscope version are you using?

The freedrive\_mode() function did not accept any arguments before Polyscope version 5.10  
See Here:  
Changelog 5.10.0: Section Controller  
[Existing _freedrive\_mode()_ script function is extended with 2 new parameters:](https://www.universal-robots.com/articles/ur/release-notes/release-note-software-version-510xx/#:~:text=CONSTRAINED%20FREEDRIVE%20SUPPORT%20IN%20UR%20SCRIPT)

So all you need to do is update to Polyscope 5.11 or higher and it should work.

---

<div class="post-metadata">

**Author:** ![sam\_bourgault](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@sam\_bourgault](https://forum.universal-robots.com/u/sam_bourgault)\
**Post date:** [May 7, 2024, 8:16pm UTC](https://forum.universal-robots.com/t/urscript-error-freedrive-mode-takes-exactly-0-arguments-2-given/34037/3 "2024-05-07T20:16:20Z")

</div>

Hi robin\_gdwl,

I’m running 5.9.3 (Sep 22, 2020). This is definitely the issue! I will give it a try and report.

Thanks so much for your help,

sam

---

<div class="post-metadata">

**Author:** ![sam\_bourgault](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@sam\_bourgault](https://forum.universal-robots.com/u/sam_bourgault)\
**Post date:** [May 27, 2024, 8:34pm UTC](https://forum.universal-robots.com/t/urscript-error-freedrive-mode-takes-exactly-0-arguments-2-given/34037/4 "2024-05-27T20:34:58Z")

</div>

Updating the polyscope to 5.16.0 solved my issue.
