Hi I am using Python code
using the function importFinger_function and getting an error message in CoppeliaSim "External call to simCallScriptFunction failed (importFinger_function@CodeDummy): Failed calling script function."
How might I alleviate this error?
Error using callScriptFunction
Error using callScriptFunction
Last edited by adamg on 04 Apr 2022, 11:30, edited 2 times in total.
Re: Error using callScriptFunction
Hello,
which version of CoppeliaSim are you using? With V4.2+ and Python, we highly recommend to use the ZeroMQ remote API, which makes everything much easier.
In your case, make sure that the script is initialized at the time you call it.
Please also show us your child script code.
Cheers
which version of CoppeliaSim are you using? With V4.2+ and Python, we highly recommend to use the ZeroMQ remote API, which makes everything much easier.
In your case, make sure that the script is initialized at the time you call it.
Please also show us your child script code.
Cheers
Re: Error using callScriptFunction
Hi,
Thanks for your response.
I am currently using version 4.2.
How can I ensure that the script is initialised at the time that I call it ?
Thanks
Thanks for your response.
I am currently using version 4.2.
How can I ensure that the script is initialised at the time that I call it ?
Thanks
Re: Error using callScriptFunction
First, check if the script has executed the init, but not yet the cleanup phase. e.g. simply add a print
Cheers
Cheers
Re: Error using callScriptFunction
The full child script is as such
and the initial comments are executed in the init phase
and the initial comments are executed in the init phase
Last edited by adamg on 04 Apr 2022, 11:31, edited 1 time in total.
Re: Error using callScriptFunction
Are you sure there was no error in that script, and that sysCall_cleanup wasn't called yet? Is the script a child script or customization script?
I can't explain the error (but don't have all the infos here neither). Can you try with the ZeroMQ remote API?
cheers
I can't explain the error (but don't have all the infos here neither). Can you try with the ZeroMQ remote API?
cheers
Re: Error using callScriptFunction
There is no error showing up in the script when I run it, when i added a comment to check if sysCall_cleanup was called the message never printed.
The script is a child script.
I will try with the ZeroMQ remote API, currently using legacy remote API client as from this page https://www.coppeliarobotics.com/helpFi ... erview.htm
The script is a child script.
I will try with the ZeroMQ remote API, currently using legacy remote API client as from this page https://www.coppeliarobotics.com/helpFi ... erview.htm
Re: Error using callScriptFunction
could it be that at the moment of calling, the script is not yet initialized? Try to wait one second after simulation started before calling that function, then we will know maybe..
Cheers
Cheers
Re: Error using callScriptFunction
Got it thanks a million for your help !