Rhasspy intent handler python script program

Good day guys, i have a Rhasspy installed on pi 4b , inside docker container privileged, and i am trying to control GPIO pins throu RPi.GPIO, i walked through many problems that i solved thanks to all your efforts and threads.
I have two scripts in the same locations, one of them is working fine unless i add “import RPi.GPIO as GPIO” then the program will not work. Unless i use the GPIO library after the " print( json.dumps(0))" then the script works but ignore all the gpio code at the end of script…

The second script is very simple, only to turn on and off GPIO pin it will not run on intent handle, but it will run on the pi terminal and will run also on the bash terminal of the docker container.
I am very confused , why intent handle script will stop when importing this particular library.
Please advise
Thanks in advance
Regards

More details:
Rhasspy used from rhasspy website, image name “rhasspy/rhasspy”
Python3 is installed on the pi and inside docker container…
And the script run normally on terminals like i said, but i think the library RPi.GPIO problem is related to something in JSON object when activated from the intent handle.
I am not sure if the script runs independent of the rhasspy or the code is embedded in another script made by rhasspy to execute it, and i think there is the problem.
Please advise a way to debug it if possible.
Thanks