Python different behavour from comand line and php call -


i'm using small python 3.4 script works great when called comand line, throws exception when called php script. here's php code running python:

$cmd = 'python3 ./realty_parser_frontend.py'; $outputfile = 'log'; $pidfile = 'pid';  exec(sprintf("%s > %s 2>&1 & echo $! >> %s", $cmd, $outputfile, $pidfile)); 

the exact error is:

unicodeencodeerror: 'ascii' codec can't encode characters in position 5-12: ordinal not in range(128) 

the thing don't error when running script directly , have no idea problem be...


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -