Liunx AttributeError:'模块'对象没有属性'文件'

时间:2019-01-01 01:53:21

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

我已经在本地下载了OAuth 2.0凭据,并将其重命名为client_secrets。杰森,但为什么出问题了?

https://github.com/tokland/youtube-upload/blob/master/README.md

我试图在github上找到答案,但是发现其他人和我有同样的问题,没有好的解决办法

[root@host ~]# youtube-upload --title="test youtube upload" 1.flv
Using client secrets: /root/.client_secrets.json                                   Using credentials file: /root/.youtube-upload-credentials.json
Traceback (most recent call last):                                                   File "/usr/bin/youtube-upload", line 10, in <module>
    main.run()                                                                       File "/usr/lib/python2.7/site-packages/youtube_upload/main.py", line 268, in run
    sys.exit(lib.catch_exceptions(EXIT_CODES, main, sys.argv[1:]))                   File "/usr/lib/python2.7/site-packages/youtube_upload/lib.py", line 44, in catch_exceptions
    fun(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/youtube_upload/main.py", line 262, in main    run_main(parser, options, args)
  File "/usr/lib/python2.7/site-packages/youtube_upload/main.py", line 176, in run_main
    youtube = get_youtube_handler(options)
  File "/usr/lib/python2.7/site-packages/youtube_upload/main.py", line 162, in get_youtube_handler
    get_code_callback=get_code_callback)
  File "/usr/lib/python2.7/site-packages/youtube_upload/auth/__init__.py", line 38, in get_resource
    storage = oauth2client.file.Storage(credentials_file)
AttributeError: 'module' object has no attribute 'file'
[root@host ~]#

0 个答案:

没有答案