-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
requests.exceptions.JSONDecodeError in pytest-reportportal v5.2.1 #225
Comments
@manvendravsingh that means your server didn't response with a JSON. Could you please describe how you configure your agent? |
I am using demo report portal. I have update my pytest.ini with following settings. Then as suggested in readme I have created rp_logger -
and using this logger in my pytest Tests. as -
now I am executing the test cases using command - pytest --reportportal Please let me know if I am missing something. |
remove the |
Thanks for reply. I am able to send test results on demo site now. Now, I have applied same changes in live project and I am facing the same issue. The main difference is that, In my live project has reportportal is deployed our port 8080 so I have to use the rp_endpoint= http://myliveprojectsite.com:8080. During handling of the above exception, another exception occurred: Traceback (most recent call last): I have tried to connect without giving the port then server is refusing the connection. (as expected) It seems like while parsing the port in endpoint JsonDecoder is failing. Please help . |
@manvendravsingh When I test the agent locally I also use port 8080 and that's cause no issue. So I would check that your instance actually working. |
@manvendravsingh i'd rather have this issue closed as this is really only some misconfig. Is your instance really reachable at the provided url (E.g. from a browser)? If you are still facing issues, please, kindly post theis kind of requests to the community slack. |
My instance is reachable. It is working fine with Python-reportportal 1.0.2 . I am trying to update to new version. Is it required to update the instance also ? |
@manvendravsingh So you are using custom solution, that explains a lot. I believe you need to double-check your URLs, there's no any different reason to get such error, except invalid URL (on working instance). Even incorrect credentials return JSON response. |
@manvendravsingh you can place a breakpoint here and see what is inside the response ( |
@rplevka I don't like exposing responses on our level of abstraction, there are HTTP logging properties which is regulated by chosen HTTP clients, which should be responsible for that. But I added better I believe this resolves the issue. |
I have update the python-reportportal to latest build. and now I am facing following issue-
PS
I am using Python version 3.7.0. Please help.
The text was updated successfully, but these errors were encountered: