Robot Framework Process library: Terminating processes is not supported by this Python version

StackOverflow https://stackoverflow.com/questions/23627526

  •  21-07-2023
  •  | 
  •  

質問

I'm running tests under robot framework 2.8.4, with maven (robotframework-maven-plugin:1.4.1). I need to use Process library to start and terminate processes. Starting processes works fine but terminating throws the error "Terminating processes is not supported by this Python version". Looking at the Process.py source code it seems to be caused by some "Attribute error" but I'm not able to tell more.

If I run the same test using pybot (Robot Framework 2.8.4 (Python 2.7.3 on linux2)) it works just fine.

If I run it using java -jar robotframework-2.8.4.jar (like the maven plugin does), with java 7 OpenJDK, I get the error.

Any clues on this ? Thanks ..

役に立ちましたか?

解決

According to the comment in the source code of the lib, terminate_process method is not supported by Jython: "Unfortunately at least beta releases of Jython 2.7 do not seem to support it either". And when you launch with RobotFramework jar, you are in fact launching with Jython, so you hit the bug. When you launch with Pybot, you use your normal Python so it works.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top