reportportal / agent-Python-RobotFramework

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

problem about listener #159

Closed theeraweej closed 1 year ago

theeraweej commented 1 year ago

hi

i am trying to run an simple example and found following errors

[ 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'
Simple test                                                           | PASS |
------------------------------------------------------------------------------
[ ERROR ] Calling method 'end_suite' of listener 'robotframework_reportportal.listener' failed: IndexError: pop from empty list
Simple                                                                | PASS |
1 test, 1 passed, 0 failed

here is my command.

robot --listener robotframework_reportportal.listener -v RP_UUID:<uuid> -v RP_ENDPOINT:"http://localhost:8080" -v RP_LAUNCH:"launch_name_1" -v RP_PROJECT:"Test1" simple.robot

i have no idea how to fix it. please help on this. Thanks

theeraweej commented 1 year ago

do i need to do anything on start_suite, start_test, start_keyword, log_message, end_keyword, end_test?

restagner commented 1 year ago

@theeraweej ,

I am seeing the exact same issue. I'm new to python's version of report portal and just started to try to use if on Friday. Have you been able to figure out a solution for your issue?

restagner commented 1 year ago

hi @iivanou ,

I'm reaching out to you in the hopes you might be able to shed some light on this issue. I've seen you responding to several gitHub issues on this project and thought I might see if you could help

iivanou commented 1 year ago

@restagner I'd request a list of installed python packages + python version as the first step. Most likely you have multiple packages with listeners in your environment and Robot picks up the broken one. This is of the top of my head.

iivanou commented 1 year ago

Also, it would be nice if you Guys can follow the Bug report template creating a new issue. This particular issue is missing a lot of details required to be shared to reproduce the problem or even to make a guess about the root cause.

restagner commented 1 year ago

@iivanou ,

Thanks for your timely responses. This is no longer an issue for me. We received the incorrect RP_PROJECT value and were attempting to use this value to connect to Report Portal. Once we had the correct value, everything worked as expected

HardNorth commented 1 year ago

@theeraweej I believe you need to check properties you bypass to the agent as Robert. You can enable request/response logging setting HTTPConnection.debuglevel to 1 somewhere in your code as here: https://github.com/reportportal/examples-python/blob/master/pytest/tests/conftest.py#L24 It should give you insights which exact property is incorrect.