Instagram-API icon indicating copy to clipboard operation
Instagram-API copied to clipboard

InstagramAPI/src/data directory is missing

Open lknix opened this issue 7 years ago • 1 comments

In [4]: i = Instagram(u, p, debug=False, IGDataPath=None)
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-4-4e39cfd9c8c9> in <module>()
----> 1 i = Instagram(u, p, debug=False, IGDataPath=None)

/home/luka/workspace/tmp/Instagram-API/virtualenv/lib/python2.7/site-packages/InstagramAPI/src/Instagram.pyc in __init__(self, username, password, debug, IGDataPath, truncatedDebug)
     68             )
     69             if not os.path.isdir(self.IGDataPath):
---> 70                 os.mkdir(self.IGDataPath, 0o777)
     71 
     72         self.checkSettings(username)

OSError: [Errno 2] No such file or directory: '/home/luka/workspace/tmp/Instagram-API/virtualenv/lib/python2.7/site-packages/InstagramAPI/src/data/<username>/'

Workaround is to manually create API/virtualenv/lib/python2.7/site-packages/InstagramAPI/src/data/ directory.

lknix avatar Mar 16 '17 20:03 lknix

I faced /data/ dir permission issues when i used the library setup as a package like you did

I suggest you pass in a custom IGDataPath eg i = Instagram(u, p, debug=False, IGDataPath='/home/danleyb2/<rwx-dir>')

danleyb2 avatar Mar 17 '17 05:03 danleyb2