Skip to content

tearDownClass() failure #25

@DenisDarahan

Description

@DenisDarahan

Sometimes (about 1 time in several runs) tests end with a JSONDecodeError. Here is the full trace:

Failure
Traceback (most recent call last):
  File "/usr/local/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/suite.py", line 290, in _tearDownPreviousClass
    tearDownClass()
  File "/Users/denisdarahan/PycharmProjects/NewProject/venv/lib/python3.9/site-packages/telenium/tests.py", line 126, in tearDownClass
    cls.stop_process()
  File "/Users/denisdarahan/PycharmProjects/NewProject/venv/lib/python3.9/site-packages/telenium/tests.py", line 114, in stop_process
    cls.cli.app_quit()
  File "/Users/denisdarahan/PycharmProjects/NewProject/venv/lib/python3.9/site-packages/telenium/client.py", line 53, in __call__
    response.json()["error"]["message"])
  File "/Users/denisdarahan/PycharmProjects/NewProject/venv/lib/python3.9/site-packages/requests/models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Actually it happens because response.text is an empty line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions