机器人框架工作:错误使用robot.run(windows环境)

时间:2016-07-15 12:19:25

标签: python robotframework

我正在尝试执行 RIDE 文件中的 Run_Keyword.robot ,该文件位于目录' Robot'来自python解释器并获得以下错误。我能够从 cmd 运行此 .py 文件而不会出现任何错误,并且会显示预期的结果。这可能是什么原因。我是机器人框架的新手。请帮助解决这个问题。

from robot import run
run('C:\\Users\\uvijayac\\Desktop\\Robot')

我得到的错误如下。

Traceback (most recent call last):
  File "C:\Users\uvijayac\Desktop\Robot\rf.py", line 27, in <module>
    run_tests()
  File "C:\Users\uvijayac\Desktop\Robot\rf.py", line 23, in run_tests
    report=report_file)
  File "C:\Python27\lib\site-packages\robot\run.py", line 471, in run
    return RobotFramework().execute(*datasources, **options)
  File "C:\Python27\lib\site-packages\robot\utils\application.py", line 83, in execute
    return self._execute(list(arguments), options)
  File "C:\Python27\lib\site-packages\robot\utils\application.py", line 89, in _execute
    return self._report_error(unicode(err), help=True)
  File "C:\Python27\lib\site-packages\robot\utils\application.py", line 110, in _report_error
    self._logger.error(message)
  File "C:\Python27\lib\site-packages\robot\output\loggerhelper.py", line 59, in error
    self.write(msg, 'ERROR')
  File "C:\Python27\lib\site-packages\robot\output\loggerhelper.py", line 62, in write
    self.message(Message(message, level, html))
  File "C:\Python27\lib\site-packages\robot\output\logger.py", line 109, in message
    logger.message(msg)
  File "C:\Python27\lib\site-packages\robot\output\monitor.py", line 66, in message
    self._writer.error(msg.message, msg.level, clear=self._running_test)
  File "C:\Python27\lib\site-packages\robot\output\monitor.py", line 142, in error
    self._highlight('[ ', level, ' ] ' + message, error=True)
  File "C:\Python27\lib\site-packages\robot\output\monitor.py", line 158, in _highlight
    self._write(before, newline=False, error=error)
  File "C:\Python27\lib\site-packages\robot\output\monitor.py", line 154, in _write
    stream.flush()
IOError: [Errno 9] Bad file descriptor
>>> 

0 个答案:

没有答案