I have done some edits in OSM via Potlatch and I've been saving them as usual, but I have found an error when saving the last changeset. After saving, Potlatch warns: "A server error occurred. Do you want to retry? (The server said: Precondition failed: Cannot create way: data is invalid.)".How can I validate data so I can save it? I haven't been able to copy the code here, but I've saved the output data in https://www.dropbox.com/s/4wrpjgoufw26nju/potlacht_error.txt asked 13 Oct '13, 18:28 polkillas aseerel4c26 ♦ |
This is a pretty unusual error, although it can occur when your network is not very reliable or at times when the API server is stressed. It is possible to recover your work from the saved file, but it requires a fair bit of technical knowledge. I have done this once, so I'm a bit sketchy on the precise details for achieving a successful upload, so I have worked through your data because I think it is worth knowing how to do this. Your file is in OSM Change Format (OSC) and can be saved as a valid XML document with a name like XXX.osc or XXX.osc.xml. This format is readable by the offline editor JOSM, although you may need to hand-edit bits of the file to be acceptable for JOSM (for instance by removing the changeset number to a placeholder value. (Search and replace changeset="999" with empty space. One way is to remove various parts of the file (conflicts and invalid preconditions can only occur on pre-existing objects, so removing delete and modify statements may help). Basically using a divide and conquer strategy means that one can recover parts of your changes separately: even if you cannot recover them all you may get the bulk of them. Once loaded into JOSM select File|Update Data. JOSM will update all objects in your file from the API database: it will probably report conflicts (in your case 25). Use the JOSM Conflict editor to resolve these conflicts & then upload your data. Select each item shown in the conflict pane. Click "Resolve Conflict", each part of the object with a conflict is shown in a tab with a red button. On each (tags, nodes, members, etc.) click the button on the left which selects your version (not the server version) and then the "Apply Resolution" button. Do this until all conflicts are resolved. I have done this with your file (I needed to step through to see what needed to be done), and I have made minor corrections to your Olive Trees (natural=tree and species=Olea europea). Potlatch seems to have created an empty way (a way with 0 nodes) which was causing the problem.
I have uploaded your data (changeset http://www.openstreetmap.org/browse/changeset/18340844), please check that it as you expect. answered 13 Oct '13, 22:24 SK53 ♦ |
Did you use Potlatch version 2 or 1?