Closed Skippern closed 2 years ago
Can confirm.
Running with Python 3.4.3 and Overpass 0.4.0.
Tried with overpy, the exact same query, and it returned results.
Python 2.7.12 and overpass 0.4.0
For some reason py3 executables seems to disappear on this computer....
I'll do another attempt to run this with py3 later today
Got python 3.4 working, but my script is written for python 2.7, need to rewrite the string handling for py3 to test further. Opened a repo for this, see skippern/gpxupload#1
I have tried to clean up the syntax, but continue to return empty queries, like {u'elements': [], u'version': 0.6, u'osm3s': {u'timestamp_osm_base': u'29553', u'timestamp_areas_base': u'29532', u'copyright': u'The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.'}, u'generator': u'Overpass API'}
, while running the exact same query in overpass turbo gives the desired result.
Actually, I found that [out:json];is_in;relation["type"="boundary"]["boundary"="administrative"]["admin_level"="2"](-20.836510,-40.923237,-20.412126,-40.494160);out tags;
returns empty object in overpass-turbo as well, while [out:json];is_in;relation["type"="boundary"]["boundary"="administrative"]["admin_level"="8"](-20.836510,-40.923237,-20.412126,-40.494160);out tags;
gives empty in python, while returns some results (expected result) in overpass-turbo.
Hey Im getting emtpy returns as well when I want json BUT When i do XML format I get expected results but in xml :(
i.e. api = overpass.API() api.Get("relation(11111111)") # returns {"features": [], "type": "FeatureCollection"}
while api.Get("relation(11111111)", "xml") # returns expected data. works with "json" as well
hope this helps
Relation 11111111
does not exist (any more). Could you give an example of a relation that does exist that has this behavior?
I'm suspecting that querying for non-existing objects causes the issue, since no further comments were added to this since.. Will leave open for @Skippern to weigh in
Closing for lack of activity. Feel free to re-open if you're still seeing this issue.
Something have changed in either the code or the API since April/2016. A script that was working fantastically in April (and maybe in May) are only returning empty strings. Search queries
[out:json];relation["type"="boundary"]["admin_level"="2"]["boundary"="administrative"](-34.0,-51.0,5.0,-28.0);
and[out:json];relation["type"="boundary"]["admin_level"="2"]["boundary"="administrative"](-34.0,-51.0,5.0,-28.0);out body;
and[out:json];relation["type"="boundary"]["admin_level"="2"]["boundary"="administrative"](-34.0,-51.0,5.0,-28.0);(._;>;);out body;
all give empty response object back from the api. Running the last search in overpass-turbo returns correctly, the boundary relation for Brazil with all members. When the script was working, the first query sentence gave only the relation object of Brazil, which is what I need for further processing.No changes have been done to the script since last successful run (except swapping between different alternatives of the searchString variable), though the PIP and the python version have been updated.
Below is a snippet from my log of the execution of the script: