Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Failure when uploading data #3884

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 7 comments
Closed

Failure when uploading data #3884

openstreetmap-trac opened this issue Jul 23, 2021 · 7 comments

Comments

@openstreetmap-trac
Copy link

Reporter: DaveF
[Submitted to the original trac issue database at 8.42pm, Sunday, 3rd July 2011]

This is an error message I'm getting:
"An unexpected error occurred, probably due to a bug in Potlatch 2. Do you want to retry? (The server said: Precondition failed: Cannot create way: data is invalid.)"

The data is in the attached file. It looks correctly formatted to me.

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 12.59pm, Monday, 4th July 2011]

There's a zero-length way in the XML, which shouldn't have got in there. Any ideas how that might have happened? (it's usually something to do with undo...)

@openstreetmap-trac
Copy link
Author

Author: DaveF
[Added to the original trac issue at 2.02pm, Monday, 4th July 2011]

Replying to [comment:1 Richard]:

There's a zero-length way in the XML, which shouldn't have got in there. Any ideas how that might have happened? (it's usually something to do with undo...)

Which nodes are those? I can't see any that are the same. I didn't start undoing until I got the error. I was using the parallel command on closed ways & placing them on top of each other to create near identical duplicates. Isn't there a way to ignore 0 lengths? Didn't P1 do that? There is a bot that cleans up duplicate points so they must be getting uploaded somehow.

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 2.12pm, Monday, 4th July 2011]

The line

<way id="-37" version="0" changeset="8628320"/>

is a way without any nodes in it.

In theory P2 could do a last-minute check before uploading, and remove them from the changeset before sending (that's roughly what P1 did), but that's not really fixing the problem - it shouldn't be creating 0-length ways internally in the first place. I'd like to find out what circumstances make it do so.

@openstreetmap-trac
Copy link
Author

Author: DaveF
[Added to the original trac issue at 2.39pm, Monday, 4th July 2011]

Replying to [comment:3 Richard]:

The line

<way id="-37" version="0" changeset="8628320"/>

is a way without any nodes in it.

Oh, I see. That's not actually a way with zero length (ie two nodes with identical lat & lon,) but poorly constructed xml.

If P2 would of excepted it without that line then it must be better/easier (especially for the end user) if it did some verification. Leaving major errors like that will only discourage users from adding to OSM

@openstreetmap-trac
Copy link
Author

Author: DaveF
[Added to the original trac issue at 5.27pm, Monday, 4th July 2011]

Replying to [comment:4 DaveF]:

If P2 would of excepted it without that line...

Oh dear; apologies for the poor spelling, That, of course, should have been 'accepted'.

@openstreetmap-trac
Copy link
Author

Author: Ollie
[Added to the original trac issue at 4.40pm, Monday, 8th August 2011]

I think I've found a reproduceable method of getting nodeless ways, so leading to this error.

  1. Create a way.
  2. Press "P" to start creating a parallel way.
  3. Without moving the mouse (i.e. before the new-extent lines start to appear), click.

I often do something similar to this (although I move the mouse back and forth to insubstantiate the way properly) in order to create a "duplicate" identically-shaped object, e.g. blocks of houses. If I don't move the mouse, the problem occurs.

Below is the OSM.xml which got created when I did the above, and so causes the error to appear.

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 1.37pm, Monday, 3rd October 2011]

Ollie - thanks; have fixed that in systemed/potlatch2@dd2f112 . Am closing this for now, but if anyone can find another way of creating 0-length ways then they can reopen it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant