使用官方SDK报错

不卷毛
  • 355

今天刚开始使用upyun, 在使用官方的SDK的时候总是会报如下错误:

Traceback (most recent call last):
  File "up.py", line 6, in <module>
    '00a0d34d7626e858ac0bb90c109628c7.jpg')
  File "build/bdist.macosx-10.11-intel/egg/upyun/upyun.py", line 142, in put
  File "build/bdist.macosx-10.11-intel/egg/upyun/upyun.py", line 252, in __do_http_request
  File "build/bdist.macosx-10.11-intel/egg/upyun/upyun.py", line 436, in __do_http_human
upyun.upyun.UpYunServiceException: ('571f6db4ed722e4e8566d6ef5c40433a', 401, 'Unauthorized', u'{"msg":"account blocked","code":40100011,"id":"571f6db4ed722e4e8566d6ef5c40433a"}')

代码如下:

import upyun

up = upyun.UpYun('空间名称', '操作员', '密码', timeout=60,
                  endpoint=upyun.ED_AUTO)
up.put('00a0d34d7626e858ac0bb90c109628c7.jpg',
       '00a0d34d7626e858ac0bb90c109628c7.jpg')

SDK的安装就直接github上clone下来 python setup.py install 安装的.

恳请帮助, 感激不尽.

回复
阅读 2.2k
1 个回答
✓ 已被采纳

账户的状态正常么?