Skip to content

Feature 604, JSONDecodeError in the response to the request 08 #29

@flopezag

Description

@flopezag

We need to analyse the JSONDecodeError message that we obtain in the execution of the feature 604 in the Scenario 08 - Direct update of the Context Broker. Result obtained.


Traceback (most recent call last):
  File "/Users/fernandolopez/Documents/workspace/bdd/qa-fiware-tutorials/.venv/lib/python3.9/site-packages/requests/models.py", line 910, in json
    return complexjson.loads(self.text, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/Library/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 "/Library/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)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "features/steps/401.Administrating_Users_and_Organizations.py", line 573, in step_impl
    context.response = response.json()
  File "/Users/fernandolopez/Documents/workspace/bdd/qa-fiware-tutorials/.venv/lib/python3.9/site-packages/requests/models.py", line 917, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value] <!DOCTYPE html><html><head><title></title><link rel="shortcut icon" href="/img/favicon.ico"><link rel="stylesheet" href="/stylesheets/style.css"></head><body><div></div><div style="display:block;clear:both;background-color: #e5f5f7;padding:10px;"><div class="main page-container"><a href="/"><img height="50px" src="/img/fiware.svg"></a></div><div style="width=100%;"></div></div><div class="main page-container" style="padding-top:10px"></div><div class="main page-container"><h1>Unexpected token ' in JSON at position 99</h1><h2></h2><pre></pre></div></body></html>: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/fernandolopez/Documents/workspace/bdd/qa-fiware-tutorials/.venv/lib/python3.9/site-packages/behave/model.py", line 1329, in run
    match.run(runner.context)
  File "/Users/fernandolopez/Documents/workspace/bdd/qa-fiware-tutorials/.venv/lib/python3.9/site-packages/behave/matchers.py", line 98, in run
    self.func(context, *args, **kwargs)
  File "features/steps/401.Administrating_Users_and_Organizations.py", line 579, in step_impl
    parser = minidom.parseString(response.text)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/xml/dom/minidom.py", line 1998, in parseString
    return expatbuilder.parseString(string)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/xml/dom/expatbuilder.py", line 925, in parseString
    return builder.parseString(string)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: mismatched tag: line 1, column 147


Prev. step failed. Rest part of scenario is skipped

Prev. step failed. Rest part of scenario is skipped

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions