You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed that V3 listeners generate a lot of errors for methods that aren't even in the listener file, the errors all have this message:
[ ERROR ] Calling method '' of listener '' failed: TypeError: SuiteVisitor.() takes 2 positional arguments but 3 were given
This Issue applies to Robot Framework 7.0 and 7.0.1, and also earlier versions (don't remember which ones)
I have created an example to you can reproduce this issue (feel free to use it as a test case):
mylistener.py:
from robot.api import SuiteVisitor
from robot.libraries.BuiltIn import BuiltIn
class mylistener(SuiteVisitor):
ROBOT_LISTENER_API_VERSION = 3
def end_test(self, test, result):
print(test.name)
print(test.parent.metadata)
myrobot.robot:
*** Test Cases ***
Demo Test Case
Demo Keyword
Demo If
Demo For Loop
Demo While Loop
*** Keywords ***
Demo Keyword
No Operation
Demo If
VAR ${a} aaa
IF '${a}' == 'aaa'
Log ${a}
END
Demo For Loop
FOR ${i} IN RANGE 3
Log ${i}
END
Demo While Loop
VAR ${i} 0
WHILE ${i} < 3
${i}= Evaluate ${i} + 1
END
Command to reproduce:
robot --listener mylistener.py myrobot.robot
Errors this produces in the log.html file (and on the console):
20240625 13:26:25.200 ERROR Calling method 'start_suite' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_suite() takes 2 positional arguments but 3 were given
20240625 13:26:25.201 ERROR Calling method 'start_test' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_test() takes 2 positional arguments but 3 were given
20240625 13:26:25.201 ERROR Calling method 'start_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.202 ERROR Calling method 'start_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.202 ERROR Calling method 'end_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.203 ERROR Calling method 'end_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.203 ERROR Calling method 'start_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.203 ERROR Calling method 'start_var' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_var() takes 2 positional arguments but 3 were given
20240625 13:26:25.203 ERROR Calling method 'end_var' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_var() takes 2 positional arguments but 3 were given
20240625 13:26:25.204 ERROR Calling method 'start_if' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_if() takes 2 positional arguments but 3 were given
20240625 13:26:25.204 ERROR Calling method 'start_if_branch' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_if_branch() takes 2 positional arguments but 3 were given
20240625 13:26:25.204 ERROR Calling method 'start_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.204 ERROR Calling method 'end_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.205 ERROR Calling method 'end_if_branch' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_if_branch() takes 2 positional arguments but 3 were given
20240625 13:26:25.205 ERROR Calling method 'end_if' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_if() takes 2 positional arguments but 3 were given
20240625 13:26:25.205 ERROR Calling method 'end_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.205 ERROR Calling method 'start_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.206 ERROR Calling method 'start_for' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_for() takes 2 positional arguments but 3 were given
20240625 13:26:25.206 ERROR Calling method 'start_for_iteration' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_for_iteration() takes 2 positional arguments but 3 were given
20240625 13:26:25.206 ERROR Calling method 'start_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.207 ERROR Calling method 'end_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.207 ERROR Calling method 'end_for_iteration' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_for_iteration() takes 2 positional arguments but 3 were given
20240625 13:26:25.207 ERROR Calling method 'start_for_iteration' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_for_iteration() takes 2 positional arguments but 3 were given
20240625 13:26:25.207 ERROR Calling method 'start_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.208 ERROR Calling method 'end_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.208 ERROR Calling method 'end_for_iteration' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_for_iteration() takes 2 positional arguments but 3 were given
20240625 13:26:25.208 ERROR Calling method 'start_for_iteration' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_for_iteration() takes 2 positional arguments but 3 were given
20240625 13:26:25.208 ERROR Calling method 'start_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.209 ERROR Calling method 'end_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.209 ERROR Calling method 'end_for_iteration' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_for_iteration() takes 2 positional arguments but 3 were given
20240625 13:26:25.209 ERROR Calling method 'end_for' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_for() takes 2 positional arguments but 3 were given
20240625 13:26:25.209 ERROR Calling method 'end_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.210 ERROR Calling method 'start_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.210 ERROR Calling method 'start_var' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_var() takes 2 positional arguments but 3 were given
20240625 13:26:25.210 ERROR Calling method 'end_var' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_var() takes 2 positional arguments but 3 were given
20240625 13:26:25.210 ERROR Calling method 'start_while' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_while() takes 2 positional arguments but 3 were given
20240625 13:26:25.211 ERROR Calling method 'start_while_iteration' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_while_iteration() takes 2 positional arguments but 3 were given
20240625 13:26:25.211 ERROR Calling method 'start_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.211 ERROR Calling method 'end_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.211 ERROR Calling method 'end_while_iteration' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_while_iteration() takes 2 positional arguments but 3 were given
20240625 13:26:25.212 ERROR Calling method 'start_while_iteration' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_while_iteration() takes 2 positional arguments but 3 were given
20240625 13:26:25.212 ERROR Calling method 'start_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.212 ERROR Calling method 'end_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.212 ERROR Calling method 'end_while_iteration' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_while_iteration() takes 2 positional arguments but 3 were given
20240625 13:26:25.213 ERROR Calling method 'start_while_iteration' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_while_iteration() takes 2 positional arguments but 3 were given
20240625 13:26:25.213 ERROR Calling method 'start_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.start_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.213 ERROR Calling method 'end_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.214 ERROR Calling method 'end_while_iteration' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_while_iteration() takes 2 positional arguments but 3 were given
20240625 13:26:25.214 ERROR Calling method 'end_while' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_while() takes 2 positional arguments but 3 were given
20240625 13:26:25.214 ERROR Calling method 'end_keyword' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_keyword() takes 2 positional arguments but 3 were given
20240625 13:26:25.215 ERROR Calling method 'end_suite' of listener '/home/dave/Documents/tmp/listener_errors/mylistener.py' failed: TypeError: SuiteVisitor.end_suite() takes 2 positional arguments but 3 were given
Expected result: This should no produce any errors
The text was updated successfully, but these errors were encountered:
I have noticed that V3 listeners generate a lot of errors for methods that aren't even in the listener file, the errors all have this message:
This Issue applies to Robot Framework 7.0 and 7.0.1, and also earlier versions (don't remember which ones)
I have created an example to you can reproduce this issue (feel free to use it as a test case):
mylistener.py:
myrobot.robot:
Command to reproduce:
Errors this produces in the log.html file (and on the console):
Expected result: This should no produce any errors
The text was updated successfully, but these errors were encountered: