stanvanrooy / instauto

Simple to use wrapper around the private Instagram API, written in Python.
https://instauto.readthedocs.io
MIT License
105 stars 24 forks source link

Cannot create Client #189

Closed alosoft closed 3 years ago

alosoft commented 3 years ago

Describe the bug Am not able to create a client

To Reproduce Steps to reproduce the behavior: `>>> from instauto import api, bot

client = api.client.ApiClient(username, password) Traceback (most recent call last): File "", line 1, in File "C:\Users\Alonso\AppData\Local\Programs\Python\Python39\lib\site-packages\instauto\api\client.py", line 65, in init self._user_agent = self._build_user_agent() File "C:\Users\Alonso\AppData\Local\Programs\Python\Python39\lib\site-packages\instauto\api\actions\request.py", line 157, in _build_user_agent s = f"Instagram {self.ig_profile.version} Android ({self.device_profile.android_sdk_version}/" \ AttributeError: 'str' object has no attribute 'version' `

But am able to get client this way

``>>> from instauto import api, bot

bot = bot.Bot(username, password) client = bot._client client <instauto.api.client.ApiClient object at 0x000001B4531E71C0>

`

Setup Instauto version: 2.0.1

stanvanrooy commented 3 years ago

You should use Client(user_name='username', password='password').

alosoft commented 3 years ago

You should use Client(user_name='username', password='password').

this gave me got an unexpected keyword argument 'user_name'

stanvanrooy commented 3 years ago

my bad, it's username="your_username"

alosoft commented 3 years ago

It's now working in version 2.0.2. Thanks