youtube-upload [Errno 54]连接由同行重置

时间:2015-08-05 14:44:11

标签: python youtube youtube-api youtube-data-api

我通过youtube-upload .sh批量上传视频时遇到此问题。我该怎么做才能防止这种情况发生?任何人都可以教我如何在.sh中写一些东西来对这个错误采取行动吗?我应该重试脚本的最后一行还是别的什么?

Traceback (most recent call last):
File "/usr/local/bin/youtube-upload", line 5, in <module>
    main.run()
File "/Library/Python/2.7/site-packages/youtube_upload/main.py", line 214, in run
    sys.exit(lib.catch_exceptions(EXIT_CODES, main, sys.argv[1:]))
File "/Library/Python/2.7/site-packages/youtube_upload/lib.py", line 35, in catch_exceptions
    fun(*args, **kwargs)
File "/Library/Python/2.7/site-packages/youtube_upload/main.py", line 211, in main
    run_main(parser, options, args)
File "/Library/Python/2.7/site-packages/youtube_upload/main.py", line 153, in run_main
    video_id = upload_youtube_video(youtube, options, video_path, len(args), index)
File "/Library/Python/2.7/site-packages/youtube_upload/main.py", line 121, in upload_youtube_video
    request_body, progress_callback=progress.callback)
File "/Library/Python/2.7/site-packages/youtube_upload/upload_video.py", line 37, in upload
    RETRIABLE_EXCEPTIONS, max_retries=max_retries)
File "/Library/Python/2.7/site-packages/youtube_upload/lib.py", line 71, in retriable_exceptions
    raise exc
socket.error: [Errno 54] Connection reset by peer`

这就是我在.sh文件中使用的内容,我为不同的视频重复了20行。

youtube-upload --title="" --client-secrets=client_secrets.json -- description="" --tags="" --thumbnail="" --playlist="" --privacy="unlisted" /users/desktop/video/4.mp4

0 个答案:

没有答案