[BUG] Upload function Says, Error parsing error response: Expecting value: line 1 column 1 (char 0)
0xrasla opened this issue · 2 comments
Describe the bug
When i try to upload, this bug happens
self.bot = client(self.config.getEnvVariable("username"), self.config.getEnvVariable("password"))
def PostImagetoInsta(self, quote: str, author: str) -> None:
"""Post the image to the instagram."""
try:
imagepath = os.path.join(os.path.dirname(__file__), "img.jpg")
caption = f"{self.utils.formatTheString(quote)}\n\n- {author} + \n #lazyinstabot \n Lazy Insta Bot \U0001f600 Coded and Managed By @rassouniqz...follow for more posts \n #programming #coding #python #bot #programmingquotes #daily #codemore codedaily #developer"
self.bot.upload(imagepath, caption)
except Exception as e:
print(e)
print("Failed to post to instagram")
Expected behavior
The Photo Must be Uplaod to insta
Logs
Error parsing error response: Expecting value: line 1 column 1 (char 0)
Error is >>
Not Found
Something went bad.
Please retry or send an issue on https://github.com/b3nab/instapy-cli
Unable to upload.
Failed to post to instagram
Env (please complete the following information):
- OS: Windows
- Python: [e.g. 3.10]
- instapy-cli Version: [e.g. 0.0.9.0]
I am too getting the same error.
[IG] not found cookie/cookie_file >> login as default
[1/20] files_to_upload/saree_1.jpg
Error parsing error response: Expecting value: line 1 column 1 (char 0)
Error is >>
Not Found
Something went bad.
Please retry or send an issue on https://github.com/b3nab/instapy-cli
OSError Traceback (most recent call last)
Input In [2], in <cell line: 18>()
24 print(info_file2)
25 time.sleep(1)
---> 26 cli.upload(file_da_caricare)
27 quantity += 1
File ~\anaconda3\lib\site-packages\instapy_cli\cli.py:153, in InstapyCli.upload(self, file, caption, story)
151 print('Done.')
152 else:
--> 153 raise IOError("Unable to upload.")
154 return res
OSError: Unable to upload.