#!/usr/bin/env python # -*- coding: UTF-8 -*- from yametrikapy import Metrika def main(): client_id = '6993a3cd88e34ac686504790c7fe341c' login = '' password = '' metrika = Metrika(client_id, login, password) counters = metrika.GetCounterList().counters print counters # output obtained data print metrika.GetData() if __name__ == '__main__': main()
ввожу логин, пароль
пишет
ошибку
Traceback (most recent call last):
File “\prog\lib_2.py”, line 19, in <module>
main()
File “\prog\lib_2.py”, line 12, in main
counters = metrika.GetCounterList().counters
File “C:\Python27\lib\site-packages\yametrikapy-1.0-py2.7.egg\yametrikapy\core.py”, line 242, in func
obj = f(self, *args, **kwargs)
File “C:\Python27\lib\site-packages\yametrikapy-1.0-py2.7.egg\yametrikapy\core.py”, line 274, in GetCounterList
return self._GetData('GET', uri, params)
File “C:\Python27\lib\site-packages\yametrikapy-1.0-py2.7.egg\yametrikapy\core.py”, line 186, in wrapper
self._Authorize()
File “C:\Python27\lib\site-packages\yametrikapy-1.0-py2.7.egg\yametrikapy\core.py”, line 181, in _Authorize
self._AuthorizeHandle()
File “C:\Python27\lib\site-packages\yametrikapy-1.0-py2.7.egg\yametrikapy\core.py”, line 159, in wrapper
raise APIException(obj.error)
APIException: invalid_grant
Можете подсказать где косячу?