[JOSM] OverpassTurbo: "overpass-api.de' reported bad request"

Hello

I wanted to query OSM for all the contraflow cycle lanes with the following query which does work when used in OverpassTurbo, but for some reason, JOSM ain’t happy:

File > Download from Overpass API:

[out:json][timeout:25];
{{geocodeArea:"SomeCity"}}->.a;
(
  node["cycleway"="opposite_lane"]["oneway"="yes"](area.a);
  way["cycleway"="opposite_lane"]["oneway"="yes"](area.a);
  relation["cycleway"="opposite_lane"]["oneway"="yes"](area.a);
);
out body;
>;
out skel qt

;

Download: "Bad request: The OSM server “overpass-api.de’ reported a bad request.”

Any idea why?

Thank you.

JOSM doesn’t understand JSON output format (“[out:json]”), as well as the “out body; >; out skel qt;” stuff at the end. Don’t just copy and paste your query in overpass turbo to JOSM without prior adjustments, it will just fail for those reasons.

If you don’t have any idea what this all means, I’d recommend to use “Export → JOSM” function in overpass turbo, and have the query automatically repaired. It assumes that your JOSM is already running and accepts remote calls.

A working query will look as follows: http://overpass-turbo.eu/s/q6t