Установил библиотеку python-instagram, зарегистрировал приложение. Получил access_token. При запуске любых примеров выпадают ошибки(см изображение). В чём проблема?
PS. Делал по инструкции с
этого сайта
PPS.
/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 /Users/victor/PycharmProjects/Instagram/main.py
Traceback (most recent call last):
File "/Users/victor/PycharmProjects/Instagram/main.py", line 10, in <module>
media_ids,next = api.tag_recent_media(tag_name='instadogs', count=80)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/instagram/bind.py", line 196, in _call
return method.execute()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/instagram/bind.py", line 182, in execute
include_secret=self.include_secret)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/instagram/oauth2.py", line 224, in prepare_request
url = self._full_url_with_params(path, params, include_secret)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/instagram/oauth2.py", line 148, in _full_url_with_params
self._full_query_with_params(params) +
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/instagram/oauth2.py", line 144, in _full_url
self._signed_request(path, {}, include_signed_request, include_secret))
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/instagram/oauth2.py", line 172, in _signed_request
return "&sig=%s" % self._generate_sig(path, params, self.api.client_secret)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/instagram/oauth2.py", line 127, in _generate_sig
return hmac.new(secret, sig, sha256).hexdigest()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/hmac.py", line 144, in new
return HMAC(key, msg, digestmod)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/hmac.py", line 42, in __init__
raise TypeError("key: expected bytes or bytearray, but got %r" % type(key).__name__)
TypeError: key: expected bytes or bytearray, but got 'str'