hi
I found a problem posting the video and it gives an error when I run the code.
Please explain more about (photo_data) because I did not understand it.
Paste the output of python -V here:
Code:
from instagram_private_api import Client
import os
user_name = 'xxx'
password = 'xxx'
api = Client(user_name, password, kwargs=None)
api.login()
video = '6992355864254467334.mp4'
pathvideo = r'D:\code\Tiktok\instagram_private_api-master\6992355864254467334.mp4'
picturpath = r'D:\code\Tiktok\instagram_private_api-master\coveerpost.jpg'
api.post_video(pathvideo, (1080, 1080),11 ,picturpath , caption='for test', to_reel=False, kwargs=None)
Error/Debug Log:
d:\code\Tiktok\instagram_private_api-master\instagram_private_api\endpoints\upload.py:497: UserWarning: This endpoint has not been fully tested.
warnings.warn('This endpoint has not been fully tested.', UserWarning)
11
Error parsing error response: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "d:\code\Tiktok\instagram_private_api-master\instagram_private_api\client.py", line 523, in _call_api
response = self.opener.open(req, timeout=self.timeout)
File "C:\Users\ghodsi.computer\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 523, in open
response = meth(req, response)
File "C:\Users\ghodsi.computer\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 632, in http_response
response = self.parent.error(
File "C:\Users\ghodsi.computer\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 561, in error
return self._call_chain(*args)
File "C:\Users\ghodsi.computer\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 494, in _call_chain result = func(*args)
File "C:\Users\ghodsi.computer\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "d:\code\Tiktok\instagram_private_api-master\tt.py", line 13, in <module>
api.post_video(pathvideo, (1080, 1080),11 ,picturpath , caption='for test', to_reel=False, kwargs=None)
File "d:\code\Tiktok\instagram_private_api-master\instagram_private_api\endpoints\upload.py", line 552, in post_video
res = self._call_api(endpoint, params=params, unsigned=True)
File "d:\code\Tiktok\instagram_private_api-master\instagram_private_api\client.py", line 527, in _call_api
ErrorHandler.process(e, error_response)
File "d:\code\Tiktok\instagram_private_api-master\instagram_private_api\errors.py", line 141, in process
raise ClientError(error_msg, http_error.code, error_response)
instagram_private_api.errors.ClientError: Not Found
Please follow the guide below
x
into all the boxes [ ] relevant to your issue (==> [x] no spaces).Before submitting an issue, make sure you have:
Which client are you using?
instagram_private_api/
)instagram_web_api/
)Describe your Question/Issue:
hi I found a problem posting the video and it gives an error when I run the code. Please explain more about (photo_data) because I did not understand it.
Paste the output of
python -V
here:Code:
Error/Debug Log: