reportportal / agent-Python-RobotFramework

Robot Framework integration for Report Portal
Apache License 2.0
59 stars 33 forks source link

listener 'robotframework_reportportal.listener' failed: TypeError: Object of type _PresenceSentinel is not JSON serializable #164

Closed yditkovi closed 1 year ago

yditkovi commented 1 year ago

Hi, I just brought up my report portal and tried to run the report portal listener with robot framework, but unfortunately got the error - Object of type _PresenceSentinel is not JSON serializable Robot Framework 6.0.2 (Python 3.8.2 on win32)

The running console: PS C:\idtf\RunningFiles> robot --listener robotframework_reportportal.listener --variable RP_ENDPOINT:"http://10.156.53.30:8080" --variable RP_UUID:"xxxxx1be-cf0d-xxxx-ba53-1fxxxxxxx" --variable RP_LAUNCH:"launch_name" --variable RP_PROJECT:"reportportal_project_name" .\test.robot

Test

[ ERROR ] Calling method 'start_suite' of listener 'robotframework_reportportal.listener' failed: TypeError: Object of type _PresenceSentinel is not JSON serializable [ ERROR ] Calling method 'start_test' of listener 'robotframework_reportportal.listener' failed: TypeError: Object of type _PresenceSentinel is not JSON serializable [ ERROR ] Calling method 'start_keyword' of listener 'robotframework_reportportal.listener' failed: AttributeError: 'NoneType' object has no attribute 'type' [ ERROR ] Calling method 'log_message' of listener 'robotframework_reportportal.listener' failed: TypeError: Object of type _PresenceSentinel is not JSON serializable [ ERROR ] Calling method 'end_keyword' of listener 'robotframework_reportportal.listener' failed: IndexError: pop from empty list [ ERROR ] Calling method 'end_test' of listener 'robotframework_reportportal.listener' failed: AttributeError: 'NoneType' object has no attribute 'update' Yuri_test | PASS |

[ ERROR ] Calling method 'end_suite' of listener 'robotframework_reportportal.listener' failed: IndexError: pop from empty list Test | PASS | 1 test, 1 passed, 0 failed

Output: C:\idtf\RunningFiles\output.xml Log: C:\idtf\RunningFiles\log.html Report: C:\idtf\RunningFiles\report.html PS C:\idtf\RunningFiles>

yditkovi commented 1 year ago

Solved by creating Project with the same name as in robot run command RP_PROJECT:"reportportal_project_name"

sovansarthak commented 1 year ago

Hi, @yditkovi I am facing the same issue, changing the project name also didn't work for me. Any clue on what could be the issue?- Attached the robot command below for your reference-

robot --listener robotframework_reportportal.listener --variable RP_UUID:"" --variable RP_ENDPOINT:"" --variable RP_LAUNCH:"onelaunch" --variable RP_PROJECT:"onepassword" --variable RP_VERIFY_SSL:"False"