video = AdVideo(parent_id='act_xxxxxxxxx')
video[AdVideo.Field.filepath] = r'C:\some\path\to\video.mp4'
video.remote_create()
execute failed with error Video Upload Time Out:
{"error":{"message":"Service temporarily unavailable","type":"OAuthException","is_transient":true,"code":2,"error_subcode":1363030,"error_user_title":"Video Upload Time Out","error_user_msg":"Your video upload timed out before it could be completed. This is probably because of a slow network connection or because the video you're trying to upload is too large. Please try again.","fbtrace_id":"Fbxxxxxx"}}
but
video[AdVideo.Field.filepath] = 'video.mp4' # in relative path
video[AdVideo.Field.filepath] = '/some/path/to/video.mp4' # on linux or macOS
works fine.
This is caused by the requests lib that change the filename header in Content-Disposition into filename*=utf-8 header when the \ path provided. While the facebook graph-video server seems do not recognize the filename*=utf-8 header
code
execute failed with error
Video Upload Time Out
:but
works fine.
This is caused by the requests lib that change the
filename
header inContent-Disposition
intofilename*=utf-8
header when the\
path provided. While the facebook graph-video server seems do not recognize thefilename*=utf-8
headerProblem of windows path without utf-8 char in filename can be solved by change https://github.com/facebook/facebook-python-business-sdk/blob/e2f279a62b7e6c7fd30a080b4be8103c7303a715/facebook_business/video_uploader.py#L216 into