Eclipse 和 RED:无法与 XML-RPC 服务器通信
Eclipse and RED: unable to communicate with XML-RPC server
最近几天,我无法在 Eclipse 和 RED 中验证我的任何自定义库。我正在使用 Robot 框架,我的库是用 Python.
编写的
它总是以这个错误结束:
RED was unable to find classes/modules inside
'C:\Users\PSaman\Desktop\python\robot_projects\matching\Libraries\MatchingLibrary.py' module
Unable to communicate with XML-RPC server
我使用的是 Eclipse 版本:
org.eclipse.platform=4.9.0.v20180906-0745
和红色版本:
org.robotframework.ide.eclipse.main.plugin (0.8.9.201811201254) "RED Robot Editor" [Active]
我试过:
1) 将我的库简化为:
import numpy as np
import cv2
class MatchingLibrary(object):
def compare(self):
self.something = False
2) 创建一个新项目。
3) 为我的项目创建一个新工作区。
4) 将 RED 更新到最新版本。
但是我得到了同样的错误。这里的解决方案是什么?
谢谢
我可以通过以下设置重现您的问题。但是,由于测试将在 Robot Framework 中正确执行,我相信这是一个 RED 问题而不是 Robot Framework 问题。这个问题也可以用 RED 0.8.8 重现。因此,我的建议是在他们的 GitHub page.
中创建一个问题
我的安装是:
- Eclipse 平台 4.9.0.v20180906-1121
- RED - 机器人编辑器 0.8.9.201811201254
- 用于 Eclipse 的 PyDev 7.0.3.201811082356
- Python 3.7.0
我用来验证的文件:
MatchingLibrary.robot
*** Settings ***
Library MatchingLibrary
*** Test Cases ***
Test MatchingLibrary
MatchingLibrary.Compare
和python图书馆:
MatchingLibrary.py
import numpy as np
# import cv2
class MatchingLibrary(object):
def compare(self):
self.something = False
这会产生以下错误:
Library specification generation problem
Problem occurred during generating libdoc for 'MatchingLibrary'
library located at 'C:\Temp\eclipse\Workspace\MatchingLibrary'. Unable
to communicate with XML-RPC server
但是,当我 运行 测试时 运行 成功,如控制台输出所示:
Command: C:\Users\anne\AppData\Local\Programs\Python\Python37\python.exe -m robot.run --listener C:\Users\anne\AppData\Local\Temp\RobotTempDir6631389808364882183\TestRunnerAgent.py:63395 --argumentfile C:\Users\anne\AppData\Local\Temp\RobotTempDir6631389808364882183\args_e04f8d14.arg C:\Temp\eclipse\Workspace\MatchingLibrary
Suite Executor: Robot Framework 3.0.4 (Python 3.7.0 on win32)
==============================================================================
MatchingLibrary
==============================================================================
MatchingLibrary.MatchingLibrary
==============================================================================
Test MatchingLibrary | PASS |
------------------------------------------------------------------------------
MatchingLibrary.MatchingLibrary | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
MatchingLibrary | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
问题已在 RED 版本 0.8.11 中修复,请检查此 release note
最近几天,我无法在 Eclipse 和 RED 中验证我的任何自定义库。我正在使用 Robot 框架,我的库是用 Python.
编写的它总是以这个错误结束:
RED was unable to find classes/modules inside
'C:\Users\PSaman\Desktop\python\robot_projects\matching\Libraries\MatchingLibrary.py' module
Unable to communicate with XML-RPC server
我使用的是 Eclipse 版本:
org.eclipse.platform=4.9.0.v20180906-0745
和红色版本:
org.robotframework.ide.eclipse.main.plugin (0.8.9.201811201254) "RED Robot Editor" [Active]
我试过:
1) 将我的库简化为:
import numpy as np
import cv2
class MatchingLibrary(object):
def compare(self):
self.something = False
2) 创建一个新项目。
3) 为我的项目创建一个新工作区。
4) 将 RED 更新到最新版本。
但是我得到了同样的错误。这里的解决方案是什么? 谢谢
我可以通过以下设置重现您的问题。但是,由于测试将在 Robot Framework 中正确执行,我相信这是一个 RED 问题而不是 Robot Framework 问题。这个问题也可以用 RED 0.8.8 重现。因此,我的建议是在他们的 GitHub page.
中创建一个问题我的安装是:
- Eclipse 平台 4.9.0.v20180906-1121
- RED - 机器人编辑器 0.8.9.201811201254
- 用于 Eclipse 的 PyDev 7.0.3.201811082356
- Python 3.7.0
我用来验证的文件:
MatchingLibrary.robot
*** Settings ***
Library MatchingLibrary
*** Test Cases ***
Test MatchingLibrary
MatchingLibrary.Compare
和python图书馆:
MatchingLibrary.py
import numpy as np
# import cv2
class MatchingLibrary(object):
def compare(self):
self.something = False
这会产生以下错误:
Library specification generation problem
Problem occurred during generating libdoc for 'MatchingLibrary' library located at 'C:\Temp\eclipse\Workspace\MatchingLibrary'. Unable to communicate with XML-RPC server
但是,当我 运行 测试时 运行 成功,如控制台输出所示:
Command: C:\Users\anne\AppData\Local\Programs\Python\Python37\python.exe -m robot.run --listener C:\Users\anne\AppData\Local\Temp\RobotTempDir6631389808364882183\TestRunnerAgent.py:63395 --argumentfile C:\Users\anne\AppData\Local\Temp\RobotTempDir6631389808364882183\args_e04f8d14.arg C:\Temp\eclipse\Workspace\MatchingLibrary
Suite Executor: Robot Framework 3.0.4 (Python 3.7.0 on win32)
==============================================================================
MatchingLibrary
==============================================================================
MatchingLibrary.MatchingLibrary
==============================================================================
Test MatchingLibrary | PASS |
------------------------------------------------------------------------------
MatchingLibrary.MatchingLibrary | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
MatchingLibrary | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
问题已在 RED 版本 0.8.11 中修复,请检查此 release note