Code Monkey home page Code Monkey logo

examples-python's Introduction

examples-python

examples-python's People

Contributors

hardnorth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

rubalcoder

examples-python's Issues

Getting Errors in hooks HOOK-ERROR in after_step: TypeError: Object of type _PresenceSentinel is not JSON serializable

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 serializable

  Captured 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.