Opened 16 years ago
Closed 16 years ago
#2440 closed defect (fixed)
JOSM API 0.5 file import not working properly
Reported by: | pinkduck | Owned by: | dmuecke |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: | DwiSecundus, CedricDumezViou, jeffrey.ratcliffe@… |
Description
If I attempt to upload the attached Lakenham.osm file (created with JOSM prior to 0.6 protocol switchover) then I receive the following error message after a while:
"Transfer aborted due to error (will wait for 5 seconds):java.io.IOException: Server returned HTTP response code: 400 for URL: http://www.openstreetmap.org/api/0.6/changeset/894153/upload
The OSM Protocol Version 0.6 page describes this error code as:
HTTP status code 400 (Bad Request) - text/plain
When there are errors parsing the XML. A text message explaining the error is returned.
When a placeholder ID is missing or not unique
Attachments (6)
Change History (31)
by , 16 years ago
Attachment: | Lakenham.zip added |
---|
by , 16 years ago
Attachment: | unterrombach.osm.bz2 added |
---|
File created with JOSM around changeset 1539
comment:2 by , 16 years ago
Cc: | added |
---|
Same problem here. Example for a failed changeset: http://www.openstreetmap.org/api/0.6/changeset/903507
I started a thread about this in the German forums: http://forum.openstreetmap.org/viewtopic.php?id=3018
comment:3 by , 16 years ago
Cc: | added |
---|---|
Version: | latest → tested |
Same problem with:
http://www.openstreetmap.org/api/0.6/changeset/905535/
I will attach .osm file.
comment:4 by , 16 years ago
Version: | tested → latest |
---|
Sorry... Shouldn't have change this...
But I use tested.
comment:5 by , 16 years ago
Steps to reproduce:
- Download unterrombach.osm.bz2 and bunzip2 it
- Open unterrombach.osm in JOSM
- Go to File -> Update Data
- Resolve all conflicts
- Then upload data to OpenStreetMap
Observed behaviour:
Error message similar to
Transfer aborted due to error (will wait for 5 seconds):java.io.IOException: Server returned HTTP response code: 400 for URL: http://www.openstreetmap.org/api/0.6/changeset/905535/upload
comment:6 by , 16 years ago
Aparently same problem:
GET http://www.openstreetmap.org/api/capabilities... OK
Communications with http://www.openstreetmap.org/api established using protocol version 0.6
PUT http://www.openstreetmap.org/api/0.6/changeset/create... OK
POST http://www.openstreetmap.org/api/0.6/changeset/911383/upload... Bad Request
PUT http://www.openstreetmap.org/api/0.6/changeset/911383/close... OK
No hint where the error is. No validation errors.
When I download from OSM, make some small changes and upload, it works.
But my big changes, some from pre-0.6, can't be uploaded.
I will try to attach the neustadt.osm.tar.bz2 file.
It contains a lot of work and it would be great if one of you experts
could enter it into the DB (or make it possible for me to do so).
By the way, I tried already to attach the file which is 160 KB
but trac complained it was too big, although the limit seems to be 256 KB.
Bug in trac?
comment:7 by , 16 years ago
Sorry, no bug in trac, 160KB was an intermediate size, the full size is 370KB.
By the way, I use JOSM 1529.
comment:8 by , 16 years ago
Cc: | added |
---|
I have exactly the same problem with a pre-0.6 .osm, with bzips to 322kb. Any pointers welcome.
comment:9 by , 16 years ago
I have been doing some upload tests with vierzon.osm.
It seems that the problem is not with new nodes and ways, nor with node suppression.
It would be more related to a modification of an existing node.
comment:10 by , 16 years ago
I reduced the problem to the modification of nodes.
A buggy .osm file that contains only a few modifications will be attached.
I'm available for further tests
by , 16 years ago
Attachment: | vierzon_noadds.osm added |
---|
by , 16 years ago
Attachment: | unterrombach-6.osm.bz2 added |
---|
Converted from unterrombach.osm with fivetosix.py
by , 16 years ago
Attachment: | fivetosix.py added |
---|
Python script that gets the node/way/relation version number from OSM and inserts it into the OSM file.
comment:11 by , 16 years ago
Today I took some more time to analyze "my" file unterrombach.osm.bz2
and compared it to files generated with latest JOSM SVN. The only difference in the file format of the old 0.5-based file compared to the format used for API version 0.6 is that ways, relations and nodes already existing in OSM have an additional version attribute. So I wrote a script (fivetosix.py
) that gets the version attribute from OSM and stores it into the file. The result is the attached file unterrombach-6.osm.bz2
which now gets a 412 error.
How can I further help to debug the problem?
@Cedric: I converted your file with my script and was able to upload the results (http://openstreetmap.org/browse/changeset/887723). However, I did not try to upload your original file. I'm using JOSM 1553 from SVN.
comment:12 by , 16 years ago
I also had this problem. I also could not solve it, although I tried different scripts and editing the file by hand, importing with different versions of josm and so.
In the end I made all the work again, every day a few minutes.
Would be great if importing 0.5 files with josm could make them usable. :)
comment:13 by , 16 years ago
Is some working at the problem?
Meanwhile, is it possible to export a way as a track from JOSM?
Or, upload only single ways / areas / parts to OSM?
Or copy and paste a selection across JOSM instances?
comment:14 by , 16 years ago
Summary: | Changset Upload Error 400 → JOSM API 0.5 file import not working properly |
---|
comment:15 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:16 by , 16 years ago
I agree osm data as they are can't be uploaded.
The easiest way to convert into 0.6 format is loading data into JOSM and use Updata Data feature. If you save the file after that you should see the version attribute for all existing tags.
As I understand you guys you want rather your existing data get uploaded then enhancing JOSM to support older osm formats? I'm right?
comment:17 by , 16 years ago
I upgraded to a newer version of JOSM and did the work all again.
But if I had known that the "Updata Data" feature was providing such help I would not have been so desesperate ;)
As far as I'm concerned, I don't need a support for older josm formats anymore since I use 0.6 format now. I guess "Update Data" would have done the upgrade for me.
Anyone agreeing?
follow-up: 20 comment:18 by , 16 years ago
I've played with Unterrombach tried to solve the conflicts but later during the upload the server told me some nodes are missing.Dwi Secundus I guess your problem comes from that . Could you resolve all conflicts and send me the file again? I'll let the upload run in debug mode then.
comment:19 by , 16 years ago
For all with issues during the upload. To make my life easier pls solve all conflicts first and then send me your files again.
comment:20 by , 16 years ago
Replying to Cedric Dumez-Viou <cedric.dumez-viou@…>:
As far as I'm concerned, I don't need a support for older josm formats anymore since I use 0.6 format now. I guess "Update Data" would have done the upgrade for me.
No, I tried "Update Data", and it didn't work.
Replying to dmuecke:
I've played with Unterrombach tried to solve the conflicts but later during the upload the server told me some nodes are missing.Dwi Secundus I guess your problem comes from that . Could you resolve all conflicts and send me the file again? I'll let the upload run in debug mode then.
In the meantime I redid all my edits, so I don't need to upgrade any files from 0.5 to 0.6 format. As far as I can remember, I tried to upgrade unterrombach.osm.bz2
with my fivetosix.py
script (adds the version numbers) and removed all conflicts by hand, and it still didn't work.
comment:21 by , 16 years ago
Note that we have a much better conflict resolution now. Previous version had large deficits in that area.
follow-up: 24 comment:22 by , 16 years ago
If nobody needs any files uploaded I would close this bug.
comment:23 by , 16 years ago
7 weeks has been too long for this bug to be fixed. I got around to manually reworking all the editing of my original GPS data with reluctance and frustration. This all happened because the published date for the OSM database shutdown was a day later than when read-only mode was activated. I had planned to upload the data set on Friday morning :(
comment:24 by , 16 years ago
Replying to dmuecke:
If nobody needs any files uploaded I would close this bug.
That's fine with me.
comment:25 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
OSM saved from JOSM < 1529