Skip to content
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

AttributeError: 'NoneType' object has no attribute 'log' #182

Closed
wtrwinberg opened this issue Apr 26, 2022 · 7 comments
Closed

AttributeError: 'NoneType' object has no attribute 'log' #182

wtrwinberg opened this issue Apr 26, 2022 · 7 comments
Assignees

Comments

@wtrwinberg
Copy link

A PytestUnhandledThreadExceptionWarning is triggered when returning the log property from the rp_client object:

AttributeError: 'NoneType' object has no attribute 'log'

This warning does not appear with reportportal-client at version 5.1.0 and below but appears at 5.2.0 onwards.

@HardNorth
Copy link
Member

@wtrwinberg I don't see such error on our examples. Which agent version do you use?

@wtrwinberg
Copy link
Author

@HardNorth The agent version is the latest available: 5.1.1

@HardNorth
Copy link
Member

@wtrwinberg I'm still not getting it. Where do you get rp_client object? How do you get log property? Could you please point on some code?

@HardNorth
Copy link
Member

Actually there is no log property in RPClient class. There is log method, but it does not return anything by design.

@wtrwinberg
Copy link
Author

wtrwinberg commented Apr 27, 2022

That's correct - the log method is utilised by default, where the warning appears when it emits rp_client.log at the return statement in the following file https://github.com/reportportal/client-Python/blob/develop/reportportal_client/logs/init.py - it might be a version mismatch, if so, the issue can be closed

@HardNorth
Copy link
Member

Ahh, thanks, now I got it.

@HardNorth HardNorth self-assigned this Apr 28, 2022
@HardNorth
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants