Bootstrap

Python3 ‘ascii’ codec can‘t encode characters in position ...

Python3 ‘ascii’ codec can't encode characters in position ...

故事(故障)背景

Java 执行自定义的Python脚本,从标准输出流中获取脚本执行结果。

public static void main(String[] args) throws Exception {
   

  String[] arguments = {
   "python3", "/path/test.py"};
  Process process = Runtime.getRuntime().exec(arguments)
;