Error in child script

Typically: "How do I... ", "How can I... " questions
Post Reply
Prabin
Posts: 4
Joined: 29 Jan 2024, 17:36

Error in child script

Post by Prabin »

Hi, This is Dr. Prabin Kumar Jha and started working with new version of coppeliasim Edu ver. 4.6.0. I wanted to write control via python child script but got message: [/Sphere@childScript:error] Traceback (most recent call last):
if m := re.search(r'[_\w][_\w\.]*$', input):

Can anyone help me out?
Thanks!

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: Error in child script

Post by coppelia »

Hello,

please state the whole error message, and show us the relevant code.

Cheers

Prabin
Posts: 4
Joined: 29 Jan 2024, 17:36

Re: Error in child script

Post by Prabin »

I opened the model "holonomicPathPlanning3dof-python" from C:\Program Files\CoppeliaRobotics\CoppeliaSimEdu\scenes\pathPlanning. I ran the simulation. The detail error as given below:


[sandboxScript:error] Traceback (most recent call last):
if m := re.search(r'[_\w][_\w\.]*$', input):
^
SyntaxError: invalid syntax

[sandboxScript:info] Simulator launched, welcome!
[Connectivity >> WebSocket remote API server@addOnScript:error] 124: in sim.genericFunctionHandler: Only one usage of each socket address (protocol/network address/port) is normally permitted.
stack traceback:
[C]: in function 'simWS.start'
[string "Connectivity >> WebSocket remote API server@a..."]:124: in function 'sysCall_init'
[Connectivity >> ZMQ remote API server@addOnScript:error] ...ram Files/CoppeliaRobotics/CoppeliaSimEdu/lua/simZMQ.lua:4: Address in use
stack traceback:
[C]: in function 'error'
...ram Files/CoppeliaRobotics/CoppeliaSimEdu/lua/simZMQ.lua:4: in field '?'
...ram Files/CoppeliaRobotics/CoppeliaSimEdu/lua/simZMQ.lua:171: in function 'simZMQ.__raise'
...ram Files/CoppeliaRobotics/CoppeliaSimEdu/lua/simZMQ.lua:10: in field '?'
...ram Files/CoppeliaRobotics/CoppeliaSimEdu/lua/simZMQ.lua:172: in function 'simZMQ.bind'
[string "Connectivity >> ZMQ remote API server@addOnSc..."]:555: in function 'sysCall_init'
[CoppeliaSim:warning] If CoppeliaSim crashed in previous session, you can find auto-saved scenes in C:\Users\Admin\AppData\Roaming/CoppeliaSim/autoSavedScenes
[sandboxScript:info] Simulation started.
[/StartConfiguration@childScript:error] Traceback (most recent call last):
if m := re.search(r'[_\w][_\w\.]*$', input):
^
SyntaxError: invalid syntax

[sandboxScript:info] Simulation suspended.

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: Error in child script

Post by coppelia »

Are you running 2 or more instances of coppeliaSim in parallel? The default port for the ZeroMQ remote API appears to be already taken...

What revision are you running?

Cheers

Prabin
Posts: 4
Joined: 29 Jan 2024, 17:36

Re: Error in child script

Post by Prabin »

Thanks for your response. I am working on version 4.5.1(rev.4) and it is working fine.
Do you have any tutorial on Kuka robot for pick and place application based on Python child script. Can please share with me?

Regards,
Prabin

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: Error in child script

Post by coppelia »

When using Python, I highly recommend using CoppeliaSim V4.6 and later. And for easier pick-and-place motions, you might want to wait for release 4.7 (within 1-2 months), which will feature actions.

Cheers

Prabin
Posts: 4
Joined: 29 Jan 2024, 17:36

Re: Error in child script

Post by Prabin »

Thanks for your response.

Post Reply