Closed didier2020 closed 10 years ago
@didier2020 Thanks for the report. Do you want to create a Pull Request out of this?
@mahlzahn are you (still) working on this? I'd be happy to merge your code :smiley:
(sorry for my english ) github and me are not "friends" : I did not understand how the tools work ... now i use osmapi to dowload data (it's work fine). no error so no code yet .
@metaodi Firstly I’m not really working on this. I just manually did the changes didier2020 proposed besides “data can be none” issue, but did no tests for it. I will append a patch, which can be patched by “patch OsmApi.py ChangesetUpload-not-line-516-error.patch” [1].
But there was a main misunderstandig of github by me: I thought by forking I create an other project (with some same sources), but in this case with python 3 instead of 2. For the way “Fork & Pull” which [2] is proposing I would need an other fork of metaodi/osmapi.
[1] http://paste.ubuntuusers.de/418402/ [2] https://help.github.com/articles/using-pull-requests
Besides: Thanks for your work.
@mahlzahn you don't need another fork, just another branch. You forked my original repository and added your changes on the develop
branch. There are different models around how to handle this. I usually create a new branch for each pull request that I want to make. This branch should be based on the one from the original repository. That way only the relevant changes are being applied. If this is all too complicated for you, I'll simply take your patch and do it myself.
@didier2020 that's ok, I'll take care of this issue. Thanks anyway!
Ok, I will try it in the next days. (I have/want to learn that ;) )
Am 16.04.2014 18:02, schrieb Stefan Oderbolz:
@mahlzahn https://github.com/mahlzahn you don't need another fork, just another branch. You forked my original repository and added your changes on the |develop| branch. There are different models around how to handle this. I usually create a new branch for each pull request that I want to make. This branch should be based on the one from the original repository. That way only the relevant changes are being applied. If this is all too complicated for you, I'll simply take your patch and do it myself.
@didier2020 https://github.com/didier2020 that's ok, I'll take care of this issue. Thanks anyway!
— Reply to this email directly or view it on GitHub https://github.com/metaodi/osmapi/issues/10#issuecomment-40617478.
@didier2020 can you explain why these changes are necessary? I just wrote a bunch of unit tests and couldn't find a problem with ChangesetUpload
.
@didier2020 @mahlzahn Can any of you give me feedback on this issue?
sorry for "late reply" 1) i upload 10 new node =>ok. 2) i download this nodes with josm , select the nodes and delete them, write to myfile.osm 3) with osmapi, i read this file and use ChangesetUpload. ok
my error whas to do the 3) twice, there is no data, they are deleted....
Please note that osmapi doesn't currently support the .osm Files from JOSM. The format is very similar, but not exactly the same. There is already a ticket to support the JOSM format in the future (see #11). Do you agree, that I can close this issue?
yes you can ... maybe check what's append when you try to delete a node which is early deleted
line 501 data += u"<"+change["action"]+">\n" must be data += u"<"+change["data"]["action"]+">\n"
line 508 data += u"<"+change["action"]+">\n" must be data += u"</"+change["data"]["action"]+">\n"
line 516 data can be none : return is none for upload with only delete data (to be verified) fix with : if data != None: ... (indent code)
line 520 if ChangesData[i]["action"] == "delete": must be if ChangesData[i]["data"]["action"] == "delete":
line 741: autosize = self._chnagesetautosize must be autosize = self._changesetautosize