This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Errors occurred while trying to save

2

I've just made some changes to the roads around the retirement community where I live, because the routes of the roads were changed somewhat, a few years ago, when new buildings were constructed here. I used the ID editor, and I very much like the looks of the changes when viewed in that editor. However, when I try to save the changes, I get this error message: "Precondition failed: Way 230172065 requires the nodes with id in 2397936672, which either do not exist, or are not visible. Server returned status code 412"

I downloaded the file "changes.osc," and I opened it in my text editor. Both of the numbers above can be found in the file. Here they are (in boldface), in their immediate contexts (they do not occur together):

<way id="230172065" version="4"><nd ref="2387017546"/><nd ref="2387017547"/><nd ref="-2"/><nd ref="-1"/><nd ref="-4"/><nd ref="-3"/><nd ref="2387017545"/><nd ref="2387017541"/><nd ref="2387017540"/><nd ref="2387017539"/><nd ref="2387017538"/><nd ref="2397936672"/><nd ref="2387017535"/><nd ref="2387017544"/><nd ref="2387017529"/><nd ref="2387017533"/><nd ref="2387017543"/><nd ref="2387017536"/><nd ref="2387017537"/><nd ref="41771022"/><tag k="access" v="yes"/><tag k="bicycle" v="yes"/><tag k="cycleway" v="no"/><tag k="foot" v="yes"/><tag k="highway" v="residential"/><tag k="maxspeed" v="15 mph"/><tag k="name" v="Treeline Drive"/><tag k="oneway" v="no"/><tag k="source" v="GPS"/><tag k="surface" v="asphalt"/></way>

<nd ref="2397936672"/>

I do not understand the error message. Could someone explain it to me, and advise me what to do to correct the problem? Thanks!

This question is marked "community wiki".

asked 28 Nov '20, 03:08

Joel_Huberman's gravatar image

Joel_Huberman
11113
accept rate: 0%


One Answer:

1

The problem is that node 2397936672 was deleted in a changeset three hours before your question (Although you seem to have noticed the changeset and commented on it since posting your question). As the <nd ref="2397936672"/> is within the <way id="230172065" version="4">...</way> definition it is required for your edit to be valid. More background on OSM elements can be found on this page on the wiki.

I don't know if iD now has a conflict resolution environment like JOSM's these days, it didn't when this question was asked.

answered 28 Nov '20, 21:04

InsertUser's gravatar image

InsertUser
11.0k1369185
accept rate: 19%

1

Thanks, InsertUser! That explains the problem. The way to avoid such problems is to save after every edit--don't wait until a lot of changes have been made, because a later change may invalidate an earlier one.

I've been using that approach today, and it works!

(28 Nov '20, 21:12) Joel_Huberman

Source code available on GitHub .