Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.
This repository was archived by the owner on May 19, 2025. It is now read-only.

Returned XML is parsed as JSON #96

Open
@rivermont

Description

@rivermont

Seems to happen at api.py#87.

import overpass

api = overpass.API(debug=True, timeout=250)
query = "<query>"
response = api.get(query, responseformat="xml", verbosity="meta")
print(response)
Traceback (most recent call last):
  File "overpass_script.py", line 4, in <module>
    response = api.get(query, responseformat="xml", verbosity="meta")
  File "/usr/local/lib/python3.5/dist-packages/overpass/api.py", line 80, in get
    response = json.loads(r.text)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions