Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15800 closed enhancement (fixed)

detect common issues in JOSM overpass queries, like overpass turbo

Reported by: mkoniecz Owned by: team
Priority: normal Milestone: 18.01
Component: Core Version:
Keywords: template_report overpass Cc:

Description (last modified by mkoniecz)

What steps will reproduce the problem?

  1. write query that outputs JSON, not XML
  2. use query to download data in JOSM
  3. become confused by "line 1 column 1: content is not allowed in prolog" error message

What is the expected result?

JOSM behaves like overpass turbo that on Export to JOSM in this situation shows

It looks like if this query will not return OSM data in XML format with metadata. Editors like JOSM require the data to be in that format, though.

overpass turbo can help you to correct the query by choosing "repair query" below.

What happens instead?

"line 1 column 1: content is not allowed in prolog" error message

Please provide any additional information below. Attach a screenshot if possible.

IRC snippet from #osm:

[17:43] <moltonel> Howdy, is there a know issue with download-from-overpass feature in JOSM ? I'm getting a "line 1 column 1: content is not allowed in prolog" error message for a query straight out of the wizard. Using josm 13265.
[17:44] <MK> moltonel: can you post link to query?
[17:45] <moltonel> http://overpass-turbo.eu/s/v5G
[17:45] <MK> moltonel: what happens if you select export and "load data into an OSM editor: JOSM"?
[17:46] <maxerickson> moltonel: get rid of the out:json, josm is rejecting the download.
[17:46] <moltonel> maxerickson: MK: thanks, that was it.

I also was bitten by this issue before.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-12-31 03:09:43 +0100 (Sun, 31 Dec 2017)
Build-Date:2017-12-31 02:33:46
Revision:13265
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13265 en) Linux Ubuntu 16.04.3 LTS
Memory Usage: 322 MB / 869 MB (171 MB allocated, but free)
Java version: 1.8.0_151-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080

Plugins:
+ OpeningHoursEditor (33876)
+ buildings_tools (33735)
+ continuosDownload (68)
+ imagery_offset_db (33774)
+ reverter (33865)
+ todo (30303)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.

Attachments (0)

Change History (16)

comment:2 by mkoniecz, 7 years ago

Description: modified (diff)

comment:3 by mkoniecz, 7 years ago

Description: modified (diff)

comment:4 by Don-vip, 7 years ago

Can you please post a sample query?

comment:5 by mkoniecz, 7 years ago

[timeout:25];
(
  node["historic"="ringfort"];
  way["historic"="ringfort"];
);
out body;

autofixed to

[timeout:25];
(
  node["historic"="ringfort"];
  way["historic"="ringfort"];
);
out meta;/*fixed by auto repair*/

[out:json][timeout:25];
(
  node["historic"="ringfort"];
  way["historic"="ringfort"];
);
out body;
>;
out skel qt;

autofixed to

[out:xml]/*fixed by auto repair*/[timeout:25];
(
  node["historic"="ringfort"];
  way["historic"="ringfort"];
);
out meta;/*fixed by auto repair*/
>;
out meta qt;/*fixed by auto repair*/

comment:6 by Don-vip, 7 years ago

Keywords: overpass added
Milestone: 18.01

comment:7 by Don-vip, 7 years ago

Resolution: fixed
Status: newclosed

In 13335/josm:

fix #15800 - autofix common issues in overpass queries, like overpass turbo

comment:8 by Don-vip, 7 years ago

In 13336/josm:

see #15800 - autofix out: issues in overpass queries

comment:9 by Don-vip, 7 years ago

In 13337/josm:

see #15800 - fix mistake in unit test

comment:10 by Klumbumbus, 7 years ago

Resolution: fixed
Status: closedreopened

Autofix doesn't work for me. If I use one of the examples above nothing is autofixed. If the bbox includes a object, which should be downloaded then the download progress bar doesn't proceed.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-01-25 22:07:09 +0100 (Thu, 25 Jan 2018)
Build-Date:2018-01-26 02:32:22
Revision:13355
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13355 de) Windows 10 64-Bit
OS Build number: Windows 10 Pro 1709 (16299)
Memory Usage: 1791 MB / 3641 MB (772 MB allocated, but free)
Java version: 1.8.0_161-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1680x1050
Maximum Screen Size: 1680x1050
VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Program Files (x86)\josm-latest-mehr-RAM.jnlp, -Djnlpx.remove=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=1024m,4096m, -Djnlpx.splashport=62958, -Djnlpx.jvm=<java.home>\bin\javaw.exe]
Dataset consistency test: No problems found
Last edited 7 years ago by Klumbumbus (previous) (diff)

comment:11 by Don-vip, 7 years ago

The first query is invalid, even with replacing out directives, the server does not reply.

For the second query I made a mistake.

comment:12 by Don-vip, 7 years ago

Resolution: fixed
Status: reopenedclosed

In 13359/josm:

fix #15800 - mistake in replacements

comment:13 by Don-vip, 7 years ago

I think the second request is invalid as well. You can check the replacement works by running JOSM with --trace.

comment:14 by Klumbumbus, 7 years ago

OK thanks, I understand how it works now.

in reply to:  11 comment:15 by Klumbumbus, 7 years ago

Replying to Don-vip:

the server does not reply.

I think this was just a temporary problem of the overpass server. Now the example queries work for me. (However no objects are found as there a no objects tagged historic=ringfort in the database at all.)

comment:16 by Don-vip, 7 years ago

Summary: detect common issues in JOSM overpass querries, like overpass turbodetect common issues in JOSM overpass queries, like overpass turbo

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.