HTTP bridge and python (OSC)

hi
I did something similar TouchOSC-to-control-an-Arduino-Yun/touchosc.py at master · alnitak1000/TouchOSC-to-control-an-Arduino-Yun · GitHub

but I want users give the ip in http so I change the python :

json = TCPJSONClient('127.0.0.1', 5700)
ipYUN = value.get ('IPyun')
ipPC = value.get ('IPpc')
server = OSCServer( (ipYUN, 8000) )
client = OSCClient()
client.connect( (ipPC, 9000) )

and in Arduino side I put the code for it.... So it works properly till I use these command in Arduino side:

 Process p;
 p.runShellCommandAsynchronously("python /mnt/sda1/arduino/www/myfolder/myfile.py");

I know it happens because python part starts before having IP , so I try to put some if command (like : if (IPYUN1== 192 && IPPC1== 192)before it but it doesn't work again....

You're too vague. Be more specific. Remember that no one here knows anything about the rest of the code you've written. Think we are your granny: explain everything so that your granny can understand

the problem is as you see I get the ip from first part code but with process command the program doesn't work
if I use running command in putty... every thing is ok
I try to explain the problem....

The pattern I see is a common one: your python script is expecting to be run in a folder like /root or something. Double check your script DOES use absolute paths for accessing files
Can you post the python script as well?

I can't spot the problem.
Try this: create a shell script like /mnt/sda1/arduino/run.sh with contents

python /mnt/sda1/arduino/www/touchosc_mfc/touchosc-mfc.py 2> /mnt/sda1/arduino/errors.log > /mnt/sda1/arduino/log.log

Then change your sketch so that you

runShellCommandAsynchronously("sh /mnt/sda1/arduino/run.sh");

Once run, two log files will be created. Paste their contents here

maybe it happen for ram space.... how can I command which only get ip one time not more

OK
I did and the error is:
Traceback (most recent call last):
File "/mnt/sda1/arduino/www/touchosc_mfc/touchosc-mfc.py", line 20, in
server = OSCServer( (ipYUN, 8000) )
File "/usr/lib/python2.7/site-packages/OSC.py", liOSCServer: TypeError on request from Electrical-PC.lan:51962: float() argument must be a string or a number
OSCServer: TypeError on request from Electrical-PC.lan:51962: float() argument must be a string or a number
OSCServer: TypeError on request from Electrical-PC.lan:51962: float() argument must be a string or a number
ket.py", line 224, in meth
return getattr(self._sock,name)(*args)
TypeError: coercing to Unicode: need string or buffer, NoneType found

Great, now you know what is causing your python script to fail.
I don't know the OSC library: could it be that "ipYUN" is not set?