Skip to content

Capture JSON Decoder error #7

@vduseev

Description

@vduseev

Currently experiencing following issue due to the poor connection:

2018-05-15 22:28:16,639 INFO Requesting server status from IPVanish.
2018-05-15 22:28:16,647 DEBUG Starting new HTTPS connection (1): www.ipvanish.com
2018-05-15 22:28:17,345 DEBUG https://www.ipvanish.com:443 "GET /api/servers.geojson HTTP/1.1" 200 0
Traceback (most recent call last):
  File "ipvanish.py", line 186, in <module>
    process_command()
  File "ipvanish.py", line 14, in process_command
    data = get_data()
  File "ipvanish.py", line 51, in get_data
    data = call_api()
  File "ipvanish.py", line 159, in call_api
    return r.json()
  File "/Users/user/.local/share/virtualenvs/ipvanish-vyzF7bGH/lib/python3.6/site-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/Users/user/.pyenv/versions/3.6.5/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/Users/user/.pyenv/versions/3.6.5/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Users/user/.pyenv/versions/3.6.5/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

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