evonove / mkm-sdk

33 stars 14 forks source link

Not working / no response #45

Closed MarcoPescado closed 5 years ago

MarcoPescado commented 5 years ago

I tried this SDK one year ago and it worked. I received some information from the API. Yesterday I restarted my project and moved on with some topics. Sadly I forgot everything that I did in the past to get this SDK running. So I started from the beginning with these lines of code.

#!/usr/bin/python3.4

from mkmsdk.mkm import Mkm
from mkmsdk.api_map import _API_MAP

# Using API v2.0
mkm = Mkm(_API_MAP["2.0"]["api"], _API_MAP["2.0"]["api_root"])

response = mkm.account_management.account()
print(response.json())

I receive:

  File "_MKM.py", line 6, in <module>
    mkm = Mkm(_API_MAP["2.0"]["api"], _API_MAP["2.0"]["api_root"])
KeyError: '2.0'

What do I do wrong? Maybe you can provide me some help? Thx

MarcoPescado commented 5 years ago

Sorry for creating a bit of chaos. I deleted the complete raspbian and started from the beginning. Everything is fine now. It's working.