Talk:Osmapi (Python library)

From OpenStreetMap Wiki
Jump to navigation Jump to search

The example doesn't work:

>>> from osmapi import OsmApi
>>> MyApi = OsmApi.OsmApi()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: class OsmApi has no attribute 'OsmApi'
>>>

--Mishari (talk) 21:34, 2 March 2014 (UTC)

Bei mir funktioniert’s so (mit Python3, einige Anpassungen). Hast du mal mit dem Beispiel aus metaodis README versucht?
import osmapi
api = osmapi.OsmApi()
print api.NodeGet(123)
Das funktioniert bei mir dafür nicht. --Petermahlzahn (talk) 22:47, 3 March 2014 (UTC)


This question is from several years ago, but the problem is in your Python code. The line ```api = osmapi.OsmApi()``` is wrong, you should not have the ```osmapi.``` in front.

--User:Mok0 13 August 2018.