Pop up on running python child script

Typically: "How do I... ", "How can I... " questions
Post Reply
pab
Posts: 9
Joined: 19 Jan 2021, 21:05

Pop up on running python child script

Post by pab »

I am using 4.5.1 on Mac 12.6
I have added a child script -> non threaded -> python. Everytime I make a change to the python code I am greeted with a pop-up with the message below. After clicking yes it runs fine but I don't want this to pop up everytime I make a change to the Python Script. This does not happen for a Lua script, only for a Python script. How can I get rid of it? I tried setting executeUnsafe=true in userset.txt but that does not help.

Pop up on making changes to Python non threaded child script
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Child script "/Floor" (via simExtSubprocess) is trying to execute the following:

/usr/local/bin/python3 /Applications/coppeliaSim_v4_5_1.app/Contents/MacOS/../Resources/python/pythonLauncher.py tcp://127.0.0.1:23261

Do you want to allow this and memorize this permission? The identifying string will be:

/usr/local/bin/python3_/Applications/coppeliaSim_v4_5_1.app/Contents/MacOS/../Resources/python/pythonLauncher.py_tcp://127.0.0.1:X_<scriptHash>

You can enable execution of unsafe commands by default with 'executeUnsafe=true' in /Users/pranav/.CoppeliaSim/usrset.txt, at your own risk.

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Pop up on running python child script

Post by fferri »

So, after you change usrset.txt, if you enter sim.getNamedBoolParam('settings.executeUnsafe') in the status bar, what does it say?

pab
Posts: 9
Joined: 19 Jan 2021, 21:05

Re: Pop up on running python child script

Post by pab »

Many thanks for responding. I was able to fix it. After changing the flag to `executeUnsafe = true' in usrset.txt, I had to close CoppeliaSim and open it. Then it worked fine without the pop up. Curiously, I tried your command sim.getNamedBoolParam('settings.executeUnsafe') before and after changing usrset.txt and it gave me `nil' which I did not expect for both times. But my issue is fixed and I am all set. Thanks!

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Pop up on running python child script

Post by fferri »

pab wrote: 27 May 2023, 04:38 Curiously, I tried your command sim.getNamedBoolParam('settings.executeUnsafe') before and after changing usrset.txt and it gave me `nil'
Right. That would work in a version greater than 4.5.1 rev4, so not with current release.

Post Reply