User talk:EtienneChove

From OpenStreetMap Wiki
Jump to navigation Jump to search

PythonOsmApi and WPS service

Hi Etienne, I'm luca delucchi an Italian mapper. I'd like use PythonOsmApi inside a WPS service, I did some test and I have a problem when I try the auto changesetauto, this is the code I used

 >>> usern='lucadelu'
 >>> passw='******'
 >>> osmapi = OsmApi(api = unicode(''), username = unicode(usern), password = unicode(passw), changesetauto = True, changesetautotags    ={unicode('comment'): unicode('test')})
 >>> for i in range(10):
 ...     node = {unicode('lat'):i, unicode('lon'):i, unicode('tag'):{unicode('place'):unicode('locality'), unicode('name'):unicode(i)}}
 ...     osmapi.NodeCreate(node)
 >>> osmapi.flush()
 Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/usr/lib/python2.6/", line 558, in flush
   return self._changesetautoflush(True)
 File "/usr/lib/python2.6/", line 564, in _changesetautoflush
 File "/usr/lib/python2.6/", line 424, in ChangesetUpload
   data = self._http("POST", "/api/0.6/changeset/"+str(self._CurrentChangesetId)+"/upload", True, data.encode("utf-8"))
 File "/usr/lib/python2.6/", line 605, in _http
   return self._http_request(cmd, path, auth, send)
 File "/usr/lib/python2.6/", line 595, in _http_request
   raise ApiError(response.status, response.reason)
 OsmApi.ApiError: Request failed: 400 - Bad Request

have you some advice for solve this error?

thank's luca

lucadelu 12:59, 19 May 2010

Hi Lucadelu, i just tried this out today and found the bug causing it. Just try the following,it might work.


 self._conn.putheader('Content-Length', len(send))


 self._conn.putheader('Content-Length', str(len(send)))

Srikanthlogic 15:20, 31 October 2010 (UTC)

Feedback request


I am working to add new features to Search Translations (link) and would like your feedback on the same. I have an idea of a new feature, called "text search with autosuggest" through which you can specify your search filters in the search box itself (apart from the UI), and also have autosuggest to show the possible values for the filter options. An example is this.

Please write a comment here about what you think of this feature. Also here you may read about the other improvements that are planned.

Thank you and I shall be waiting for your feedback.