Calling method 'log_message' of listener 'C:XXXXX\TestRunnerAgent.py' failed: AttributeError: 'Output' object has no attribute '_xmllogger'

When i excute the test case ERROR below
command: robot -A C:\Users\NIUKAI~1\AppData\Local\Temp\RIDEq3o59_8v.d\argfile.txt --listener C:\Users\niukaixuan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py:56230:False “C:\robot case”
TestRunnerAgent: Running under CPython 3.11.8

=======================================================================================================================================================
Robot Case

Robot Case.Vaillantfamily

login | FAIL |
InvalidArgumentException: Message: ‘newCommandTimeout’ must be of type number
Stacktrace:
InvalidArgumentError: ‘newCommandTimeout’ must be of type number
at validateCaps (C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\basedriver\capabilities.js:52:11)
at parseCaps (C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\basedriver\capabilities.js:165:20)
at processCapabilities (C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\basedriver\capabilities.js:211:43)
at parseCapsForInnerDriver (C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\lib\utils.js:116:21)
at AppiumDriver.createSession (C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\lib\appium.js:325:26)
at commandExecutor (C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\basedriver\driver.js:335:9)
at AppiumDriver.executeCommand (C:\Users\niukaixuan\AppData\Local\Progr…
[ Message content over the limit has been removed. ]
at trim_prefix (C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:317:13)
at C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:335:12)
at next (C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\express\lib\router\index.js:275:10)
at C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\body-parser\lib\read.js:130:5
at invokeCallback (C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\raw-body\index.js:224:16)
at done (C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\raw-body\index.js:213:7)
at IncomingMessage.onEnd (C:\Users\niukaixuan\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\raw-body\index.js:273:7)
at IncomingMessage.emit (events.js:322:22)

Robot Case.Vaillantfamily | FAIL |
1 test, 0 passed, 1 failed

Robot Case | FAIL |
1 test, 0 passed, 1 failed

Output: C:\Users\NIUKAI~1\AppData\Local\Temp\RIDEq3o59_8v.d\output.xml

[ ERROR ] Calling method ‘log_message’ of listener ‘C:\Users\niukaixuan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py’ failed: AttributeError: ‘Output’ object has no attribute ‘_xmllogger’
[ ERROR ] Calling method ‘log_message’ of listener ‘C:\Users\niukaixuan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py’ failed: AttributeError: ‘Output’ object has no attribute ‘_xmllogger’
[ WARN ] Keyword ‘Capture Page Screenshot’ could not be run on failure: No application is open
[ ERROR ] Calling method ‘log_message’ of listener ‘C:\Users\niukaixuan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py’ failed: AttributeError: ‘Output’ object has no attribute ‘_xmllogger’
Log: C:\Users\NIUKAI~1\AppData\Local\Temp\RIDEq3o59_8v.d\log.html
Report: C:\Users\NIUKAI~1\AppData\Local\Temp\RIDEq3o59_8v.d\report.html

Test finished 20240410 08:39:09

*** Settings ***
Library AppiumLibrary

*** Variables ***
${remote_Url} http://localhost:4723/wd/hub
&{android_Caps} platformName=Android platformVersion=12 deviceName=NAB0220804041104 appPackage=com.vaillant.plus appActivity=com.vaillant.plus.MainActivity skipServerInstallation=${True} autoGrantPermission=${True} automationName=UiAutomator2 newCommandTimeout=2000 noReset=${True}

*** Test Cases ***
login
Open Application ${remote_Url} &{android_Caps}

This is a RIDE problem, and it is supposed to be already fixed in the version you mentioned, at least with Robot Framework 7.0.

Do you have different Python installations and/or RIDE ?

Now i use python3.11 and robot 6.1.1,at first i meet this problem when i use python 3.11 and robot 7.0 ,so i set the robot from 7.1 to 6.1.1 via this link RIDE Calling method 'log_message' of listener '...\TestRunnerAgent.py' failed: AttributeError: 'Output' object has no attribute '_xmllogger'
图片
and i just set ride from 2,1dev26 to 2.0.8.1 also error so what should i do?

A thing that I personally don’t like is the location of Python installation. It seems to be using some cache, so you may be using old compiled python files. (Note: I Think)

Of course RIDE 2.0.8.1 will not have the fix.

I would install Python in a own directory, instead of at user app data. For example at C:\Python311, then install the libraries and RIDE (from development version).

Hi Hélio,

If I remember correctly this is where python gets installed when you use winget or the Microsoft app store to install python, I did this once on a work computer and was horrified at where it got installed.

Unfortunately you’re likely to see more of it as it is a quick and easy way to get python installed.

At least Chocolatey uses the python distributed msi installer in quiet mode so respects the default install location.

Dave.

1 Like