#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 )
What steps will reproduce the problem?
- write query that outputs JSON, not XML
- use query to download data in JOSM
- 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:1 by , 7 years ago
comment:2 by , 7 years ago
Description: | modified (diff) |
---|
comment:3 by , 7 years ago
Description: | modified (diff) |
---|
comment:5 by , 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 , 7 years ago
Keywords: | overpass added |
---|---|
Milestone: | → 18.01 |
comment:10 by , 7 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
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
follow-up: 15 comment:11 by , 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:13 by , 7 years ago
I think the second request is invalid as well. You can check the replacement works by running JOSM with --trace
.
comment:15 by , 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 , 7 years ago
Summary: | detect common issues in JOSM overpass querries, like overpass turbo → detect common issues in JOSM overpass queries, like overpass turbo |
---|
overpass turbo checks: https://github.com/tyrasd/overpass-turbo/blob/b788464a8ac25cfb032e6316164efaafbb6232b2/js/ide.js#L2283
en localization for error messages: https://github.com/tyrasd/overpass-turbo/blob/bee1f04c33fb111485c805874a54b4905a9f2a77/locales/en.json#L242