Hello, I'm using python (jupyter notebook) to get data of hospitals in Bali area, Indonesia. Here is my code and query: but when I run the next code, it returns error the query works well in Overpass Turbo but when I put in notebook, it returns error. Thanks for the help. asked 08 May '22, 15:05 salmiah-ls edited 09 May '22, 23:43 |
One Answer:
I've found the solution. I modify the query so I doesn't include the double curly braces {{ }} anymore, which seems python can't parse. Here is my new query: or if we use area name in local language: the query returns same result and python can parse it now. answered 09 May '22, 23:41 salmiah-ls edited 09 May '22, 23:57 |

check the status code of the query, it's returning 400. The
.textsays:Error: line 2: parse error: Unknown type "{",Error: line 2: parse error: An empty query is not allowedandError: line 2: parse error: ';' expected - '{' found.yes, I have the same thought. looks like python can't parse that double curly braces {{ }}.
I wonder if there is way to modify the query in OSM so it can return the same result but without that double curly braces.