danleyb2 / Instagram-API

Instagram's private API (need help getting to v1.6 on the PHP side)
MIT License
119 stars 39 forks source link

Error while creating Instagram instace #29

Closed antonid08 closed 7 years ago

antonid08 commented 7 years ago

Hello. When i try api = Instagram('kek', 'kek', debug)

i have

Traceback (most recent call last): File "/home/antonid08/PycharmProjects/InstagramCRM/InstagramWorker/logic/SignIn.py", line 26, in <module> i = InstagramApiSigner() File "/home/antonid08/PycharmProjects/InstagramCRM/InstagramWorker/logic/SignIn.py", line 18, in __init__ self.api = Instagram('kek', 'kek', debug) # i don't know how to inject it File "/usr/local/lib/python2.7/dist-packages/InstagramAPI/src/Instagram.py", line 71, in __init__ self.checkSettings(username) File "/usr/local/lib/python2.7/dist-packages/InstagramAPI/src/Instagram.py", line 123, in checkSettings ua = userAgent.buildUserAgent() File "/usr/local/lib/python2.7/dist-packages/InstagramAPI/src/http/UserAgent.py", line 24, in buildUserAgent deviceData = self.getDeviceData() File "/usr/local/lib/python2.7/dist-packages/InstagramAPI/src/http/UserAgent.py", line 16, in getDeviceData with open(csvfile, 'rb') as file_handle: IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/InstagramAPI/src/http/devices.csv'

What i can do to fix it except for creating this file? I think it is bad idea.

antonid08 commented 7 years ago

before this i had OSError: [Errno 2] No such file or directory: '/home/antonid08/.virtualenvs/InstagramVirtualEnv/lib/python2.7/site-packages/InstagramAPI/src/data/kek/'

antonid08 commented 7 years ago

about file 'devices.csv" i found this file on git, but is is absent if to use pip installation.

about OSError. change os.mkdir(self.IGDataPath, 0777) to os.makedirs(self.IGDataPath, 0777)

file Instagram, line 69

danleyb2 commented 7 years ago

@aecd88d2e8fe91dc46a809b01cdb695cd0fd9271 fixed that, the master branch should have that issue