maproulette3 icon indicating copy to clipboard operation
maproulette3 copied to clipboard

Trying to create challenge fails without obvious reason (due to [out:json][timeout:3600] header)

Open matkoniecz opened this issue 3 years ago • 17 comments

problems tracked down in https://github.com/maproulette/maproulette3/issues/1892#issuecomment-1360286738 and https://github.com/maproulette/maproulette3/issues/1908


original report below


creating project works fine - https://maproulette.org/admin/project/50406

trying to create challenge fails with

    Unable to save your changes{details}
    Unable to retrieve latest challenge data from server.

I supplied

dead wikipedia tags in Germany

as name and

[out:xml][timeout:3600];
( 
    node(101409102)['wikipedia'='de:Roth (Lahn)'];
    node(1018918855)['wikipedia'='de:Charlottenhof (Passow)'];
    node(117178037)['wikipedia'='de:Brombach (Schmitten)'];
); out meta;

as an overpass query and

dead wikipedia tags in Germany

as description

matkoniecz avatar Dec 09 '22 19:12 matkoniecz

I did it with the following query (originally from Mateusz's wikipedia/wikidata tool) but only the nodes are listed: image

Although I have set "Does not matter" in the object type in the settings: image

@matkoniecz You could try using "out:json" instead of "out:xml".

[out:json][timeout:3600];
(
node(1296946425)['wikipedia'='de:Tumuliwarte'];
node(1855223322)['wikipedia'='de:Stiftsbibliothek Kremsmünster'];
node(2187456910)['wikipedia'='de:Dachberg Warte'];
node(2397809084)['wikipedia'='de:Category:Wayside shrines in Styria'];
node(240130401)['wikipedia'='de:St. Peter bei Freistadt'];
node(3341854763)['wikipedia'='de:Scheiblingsteinberg'];
node(4130638135)['wikipedia'='de:Hl. Simon Zelotes'];
node(4264513839)['wikipedia'='sv:Grosser Lanschütz'];
node(4270534348)['wikipedia'='sv:Goßkopf'];
node(7033816714)['wikipedia'='sv:Buchniklkogel'];
node(8147260027)['wikipedia'='de:Blinden- und Sehbehindertenverband Salzburg'];
relation(1013505)['wikipedia'='de:Sankt Pankraz (Oberösterreich)'];
relation(1017242)['wikipedia'='de:Sankt Stefan-Afiesl'];
relation(10975714)['wikipedia'='de:GumpendorferStraße'];
relation(14061043)['wikipedia'='de:Mittersiller Straße (B 168a)'];
relation(1585893)['wikipedia'='de:Tauern Spa World'];
relation(1841240)['wikipedia'='de:Schloß Lackenbach'];
relation(2030638)['wikipedia'='de:Kaiser Franz Josef I Jubiläumsfonds für Werkstättengebäude und Volkswohnungen'];
relation(2216753)['wikipedia'='de:Aschach (Fluss)'];
relation(2216951)['wikipedia'='de:Zöbernbach (Zöbern)'];
relation(2216951)['wikipedia'='de:Zöbernbach (Zöbern)'];
relation(2216951)['wikipedia'='de:Zöbernbach (Zöbern)'];
relation(2563763)['wikipedia'='de:Burg Neuberg (Hartberg)'];
relation(4583110)['wikipedia'='de:Rambach (Kierling)'];
relation(4583145)['wikipedia'='de:Lourdesbach (Rambach)'];
relation(4636127)['wikipedia'='de:Haselbach (Kierlingbach)'];
relation(4638729)['wikipedia'='de:Marbach (Kierlingbach)'];
relation(4721473)['wikipedia'='de:Bahnstrecke Zellerndorf–Sigmundsherberg)'];
relation(7962518)['wikipedia'='de:Sternhaus(Steyr)'];
relation(8788464)['wikipedia'='de:Rinnerbach(Steyr)'];
relation(941184)['wikipedia'='de:Puchenstubener Straße'];
way(1092374491)['wikipedia'='de:Bahntrassen-Radweg'];
way(117721256)['wikipedia'='de:Bahntrassen-Radweg'];
way(130646361)['wikipedia'='en:Oblaten des hl. Franz von Sales'];
way(132613067)['wikipedia'='de:Edelweißhütte (Rax-Schneeberg-Gruppe)'];
way(136065841)['wikipedia'='de:St. Margareta (Traiskirchen)'];
way(141323651)['wikipedia'='de:Villa Rustica (Hartberg)'];
way(159919953)['wikipedia'='de:Marbach (Kierlingbach)'];
way(170147208)['wikipedia'='de:St. Sebastian (Bad Blumau)'];
way(174629873)['wikipedia'='de:Pfarrkirche hl. Anna (Großstübing)'];
way(175385218)['wikipedia'='de:Kirche Sankt Florian (Straden)'];
way(188250058)['wikipedia'='de:Mariä-Heimsuchung-Kirche (Heilbrunn)'];
way(189806376)['wikipedia'='de:Burg Neuberg (Hartberg)'];
way(212496461)['wikipedia'='de:Stephansdom (Wien)'];
way(216478859)['wikipedia'='de:Maria-Loretto-Kirche (Jedlesee)'];
way(216478860)['wikipedia'='de:St.-Antonius-von-Padua-Kirche (Schwarzlackenau)'];
way(223532045)['wikipedia'='de:Pfarrkirche hl. Laurentius (Übelbach)'];
way(237641457)['wikipedia'='de:St. Pankraz (Großglobnitz)'];
way(239607728)['wikipedia'='de:Israelitische Kultusgemeinde Gänserndorf Ehemalige Synagoge Gänserndorf'];
way(249445140)['wikipedia'='de:Lourdesbach (Rambach)'];
way(249551013)['wikipedia'='de:Lourdesbach (Rambach)'];
way(26217337)['wikipedia'='de:Herz Mariä Kirche (Wiener Neustadt)'];
way(26794300)['wikipedia'='de:Haselbach (Kierlingbach)'];
way(277113975)['wikipedia'='de:St. Philipp und Jakob (Kühnring)'];
way(29303748)['wikipedia'='de:Pfarrkirche Allerheiligen (Deutschlandsberg)'];
way(296568327)['wikipedia'='de:St. Markus (Baumgarten an der March)'];
way(30200633)['wikipedia'='de:St. Georg (Stillfried)'];
way(30608215)['wikipedia'='de:Mariä-Schutz-Kirche (Groß-Enzersdorf)'];
way(306854496)['wikipedia'='de:Heilig-Kreuz-Kirche (Wien)'];
way(31791376)['wikipedia'='de:Pfarrkirche Cyrill & Method (Floridsdorf)'];
way(329126498)['wikipedia'='de:Rathaus (Pulkau)'];
way(330629346)['wikipedia'='de:St. Michael (Jahrings)'];
way(337251671)['wikipedia'='de:Museum Traiskirchen'];
way(354828844)['wikipedia'='de:Filialkirche Lauterbach'];
way(421692398)['wikipedia'='de:Marbach (Kierlingbach)'];
way(421692399)['wikipedia'='de:Marbach (Kierlingbach)'];
way(426087455)['wikipedia'='de:Liste der denkmalgeschützten Objekte in Schwanberg (Steiermark)'];
way(426087458)['wikipedia'='de:Liste der denkmalgeschützten Objekte in Schwanberg (Steiermark)'];
way(499960061)['wikipedia'='de:Karner (Burgschleinitz)'];
way(52456091)['wikipedia'='de:Kirchenruine hl. Martin (Markgrafneusiedl)'];
way(674746093)['wikipedia'='de:Franz I. (HRR)'];
way(698945450)['wikipedia'='de:Lourdesbach (Rambach)'];
way(698945466)['wikipedia'='de:Lourdesbach (Rambach)'];
way(698945467)['wikipedia'='de:Lourdesbach (Rambach)'];
way(703968012)['wikipedia'='de:Lourdesbach (Rambach)'];
way(703968013)['wikipedia'='de:Lourdesbach (Rambach)'];
way(703968014)['wikipedia'='de:Lourdesbach (Rambach)'];
way(703968015)['wikipedia'='de:Lourdesbach (Rambach)'];
way(722861808)['wikipedia'='de:Haselbach (Kierlingbach)'];
way(722861809)['wikipedia'='de:Haselbach (Kierlingbach)'];
way(722861811)['wikipedia'='de:Haselbach (Kierlingbach)'];
way(722861812)['wikipedia'='de:Haselbach (Kierlingbach)'];
way(734237748)['wikipedia'='de:Marbach (Kierlingbach)'];
way(734237749)['wikipedia'='de:Marbach (Kierlingbach)'];
way(766470380)['wikipedia'='de:Maria Jacobi (Wien)'];
way(8068080)['wikipedia'='de:Joseph Barth (Mediziner)Joseph Barth (Mediziner)'];
way(810521882)['wikipedia'='de:Marbach (Kierlingbach)'];
way(810521883)['wikipedia'='de:Marbach (Kierlingbach)'];
way(81736943)['wikipedia'='de:Anschlussdenkmal Oberschützen'];
); out meta;

mcliquid avatar Dec 11 '22 08:12 mcliquid

Tried

[out:json][timeout:3600];
( 
    node(101409102)['wikipedia'='de:Roth (Lahn)'];
    node(1018918855)['wikipedia'='de:Charlottenhof (Passow)'];
    node(117178037)['wikipedia'='de:Brombach (Schmitten)'];
); out meta;

and it failed in the same way.

Tried your query, failed in the same way.

matkoniecz avatar Dec 12 '22 17:12 matkoniecz

@matkoniecz your original overpass query does not return any data in overpass turbo, perhaps that is the issue?

mvexel avatar Dec 15 '22 23:12 mvexel

If I create a challenge just using the node identifiers from your original query:

node(id:101409102,1018918855,117178037);out meta;

that works fine. Perhaps I don't understand what you're trying to do. Happy to help more!

mvexel avatar Dec 15 '22 23:12 mvexel

@matkoniecz your original overpass query does not return any data in overpass turbo, perhaps that is the issue?

Unlikely, note that https://www.openstreetmap.org/node/101409102 https://www.openstreetmap.org/node/1018918855 https://www.openstreetmap.org/node/117178037 had their links fixed - that is why they are not listed anymore.

I will try with a new data.

matkoniecz avatar Dec 16 '22 04:12 matkoniecz

tried again

[timeout:3600]; 
( 
way(931929634)['wikidata'='Q1671197']['wikipedia'='de:Ostesee'];
way(93671652)['wikidata'='Q2318172']['wikipedia'='de:Liste der Kulturdenkmale in Bad Schwartau'];
way(95070192)['wikidata'='Q1533043']['wikipedia'='de:Gnadenkirche (Chemnitz)'];
way(96265503)['wikidata'='Q105178946']['wikipedia'='de:Possen (Sondershausen)#Possenturm']; way(96573610)['wikidata'='Q49469711']['wikipedia'='de:Graditz'];
way(97839353)['wikidata'='Q836826']['wikipedia'='de:Schweriner Rathaus'];
);
out meta;

works in Overpass, but no tasks are created: https://maproulette.org/admin/project/50406/challenge/37105

matkoniecz avatar Dec 16 '22 07:12 matkoniecz

@mvexel If you have time, try a mixed list with Nodes, Ways and Relations. I think this is the problem. If only one category of objects is used (like in your example only nodes), then it works. But if the object types are mixed, it doesn't work anymore.

mcliquid avatar Dec 18 '22 15:12 mcliquid

@mcliquid Mixed geometries are supported, I created https://maproulette.org/browse/challenges/37126 with https://overpass-turbo.eu/s/1phk as a test.

@matkoniecz your most recent overpass query does not return any geometries. MapRoulette needs geometries to make tasks :) Instead of out meta try out center or out geom (you can leave meta but you usually don't need it)

mvexel avatar Dec 20 '22 16:12 mvexel

I tried out center and out geom but MapRoulette created over 60,000 Quests. Overpass

I've already fixed the E8 hiking route because it's the longest way / most nodes but also this way will create 14 quests instead of one. image

mcliquid avatar Dec 20 '22 17:12 mcliquid

I'm pretty sure that the big relation crashed it. I've removed the E8 relation from the query and was able to create the challenge now: https://maproulette.org/browse/challenges/37131 Before I've got something over 60k quests now without relation 912994 there are only 576 quests left. Maybe the E8 relation is too big?

mcliquid avatar Dec 20 '22 18:12 mcliquid

@matkoniecz your most recent overpass query does not return any geometries. MapRoulette needs geometries to make tasks :) Instead of out meta try out center or out geom (you can leave meta but you usually don't need it)

ops, I followed https://learn.maproulette.org/documentation/using-overpass-to-create-challenges/ that had out meta; (maybe it works only for nodes and not for ways? maybe use out center; in that example to be more idiotproof?)

matkoniecz avatar Dec 20 '22 18:12 matkoniecz

@matkoniecz your most recent overpass query does not return any geometries. MapRoulette needs geometries to make tasks :) Instead of out meta try out center or out geom (you can leave meta but you usually don't need it)

    [out:json][timeout:3600]; 
    (
    node(301320843); 
    relation(1168916)['wikipedia'='de:Landwehr (Gemeinde)'];
    relation(1182652); 
    ); out center;

seems to be also not working and goes down with

Bad Request:<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" lang="en"/>
  <title>OSM3S Response</title>
</head>
<body>

<p>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</p>
<p><strong style="color:#FF0000">Error</strong>: line 1: parse error: Unknown type &quot;[&quot; </p>
<p><strong style="color:#FF0000">Error</strong>: line 1: parse error: An empty query is not allowed </p>
<p><strong style="color:#FF0000">Error</strong>: line 1: parse error: ';' expected - 'out' found. </p>

</body>
</html>

https://overpass-turbo.eu/s/1phE works

tried also out geom

matkoniecz avatar Dec 20 '22 18:12 matkoniecz

I created https://maproulette.org/browse/challenges/37135 with that query but leaving out the top statements:

(
    node(301320843); 
    relation(1168916)['wikipedia'='de:Landwehr (Gemeinde)'];
    relation(1182652); 
    ); out center;

So MapRoulette gets confused by those. We need to make that clearer. I opened a project to collect all the open tickets (and future ones) that have to do with improving the Overpass experience for challenge makers: https://github.com/orgs/maproulette/projects/1

mvexel avatar Dec 20 '22 21:12 mvexel

https://github.com/orgs/maproulette/projects/1 is either private or a broken link

matkoniecz avatar Dec 21 '22 05:12 matkoniecz

Also, maybe I done something wrongly or done test incorrectly - but this headers appeared to be fine in testing done for https://github.com/maproulette/maproulette3/issues/1908#issue-1505091071

Not sure what is going on.

matkoniecz avatar Dec 21 '22 05:12 matkoniecz

@mcliquid https://maproulette.org/admin/project/50406/challenge/37205 seems to finally work

matkoniecz avatar Dec 28 '22 10:12 matkoniecz

I opened a project to collect all the open tickets (and future ones) that have to do with improving the Overpass experience for challenge makers: https://github.com/orgs/maproulette/projects/1

That's a good project idea... I took a quick look and the code's parsing of overpass queries does not handle various orderings of the "Settings" statement. And the code adds additional settings when it thinks those are missing, so if the query is misinterpreted the other settings may be injected and essentially corrupts the query.

A few overpass Settings examples and how it influences the settings used in the query sent to overpass:

  • [out:json]; works fine, and [timeout:X]; works fine (although it is changed to [out:json][timeout:X];)
  • [out:json][timeout:X] works fine
  • [out:json]; (space at the front) breaks, resulting in [out:json][timeout:Y]; [out:json];
  • [out:json][timeout:X]; (whitespace) is broken, resulting in [out:json][timeout:Y]; [out:json][timeout:X];
    • Conflicting timeout: X is from the user and timeout Y is from the maproulette settings
  • [timeout:X][out:json]; is technically broken with the result being [out:json][timeout:X][out:json];
  • [out:xml]; breaks, resulting in [out:json][timeout:Y];[out:xml];

ljdelight avatar Jan 05 '23 08:01 ljdelight

Closed with this pr: https://github.com/maproulette/docs/pull/44

CollinBeczak avatar Aug 13 '24 18:08 CollinBeczak