reportportal / examples-python Goto Github PK
View Code? Open in Web Editor NEWTest project examples based on different frameworks which use Report Portal
Home Page: https://reportportal.io/
License: Apache License 2.0
Test project examples based on different frameworks which use Report Portal
Home Page: https://reportportal.io/
License: Apache License 2.0
Description: This issue is occuring while using behave agent with reportportal. Can anyone let me know how can this be resolved or is it a genuine bug in the behave agent library.
Issue -HOOK-ERROR in after_step: TypeError: Object of type _PresenceSentinel is not JSON serializable
Logs:
Traceback (most recent call last):
File "/Users/csharm/PycharmProjects/Test_Reports/venv/lib/python3.10/site-packages/behave/model.py", line 1329, in run
match.run(runner.context)
File "/Users/csharm/PycharmProjects/Test_Reports/venv/lib/python3.10/site-packages/behave/matchers.py", line 98, in run
self.func(context, *args, **kwargs)
File "tests/features/steps/example_steps.py", line 6, in step_impl
context.log.info('Behave is installed.')
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/logging/init.py", line 1477, in info
self._log(INFO, msg, args, **kwargs)
File "/Users/csharm/PycharmProjects/Test_Reports/venv/lib/python3.10/site-packages/reportportal_client/logs/init.py", line 79, in _log
self.handle(record)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/logging/init.py", line 1634, in handle
self.callHandlers(record)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/logging/init.py", line 1696, in callHandlers
hdlr.handle(record)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/logging/init.py", line 968, in handle
self.emit(record)
File "/Users/csharm/PycharmProjects/Test_Reports/venv/lib/python3.10/site-packages/reportportal_client/logs/init.py", line 177, in emit
rp_client.log(
File "/Users/csharm/PycharmProjects/Test_Reports/venv/lib/python3.10/site-packages/reportportal_client/client.py", line 765, in log
return self._log(self._log_batcher.append(rp_log))
File "/Users/csharm/PycharmProjects/Test_Reports/venv/lib/python3.10/site-packages/reportportal_client/_internal/logs/batcher.py", line 75, in append
return self._append(log_req.multipart_size, log_req)
File "/Users/csharm/PycharmProjects/Test_Reports/venv/lib/python3.10/site-packages/reportportal_client/core/rp_requests.py", line 453, in multipart_size
return RPRequestLog._multipart_size(self.payload, self.file)
File "/Users/csharm/PycharmProjects/Test_Reports/venv/lib/python3.10/site-packages/reportportal_client/core/rp_requests.py", line 443, in _multipart_size
size = helpers.calculate_json_part_size(payload)
File "/Users/csharm/PycharmProjects/Test_Reports/venv/lib/python3.10/site-packages/reportportal_client/helpers.py", line 357, in calculate_json_part_size
size = len(json.dumps(json_dict))
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/init.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type _PresenceSentinel is not JSON serializableCaptured stdout: HOOK-ERROR in after_step: TypeError: Object of type _PresenceSentinel is not JSON serializable
HOOK-ERROR in after_scenario: TypeError: Object of type _PresenceSentinel is not JSON serializable
When we implement 5 tests # None
Then behave will test them for us! # None
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.