python续点上传问题None bad token...,pythontoken..,为什么为我用qiniu的
python续点上传问题None bad token...,pythontoken..,为什么为我用qiniu的
为什么为我用qiniu的python sdk生成的token,在续点上传时会出现 “None bad token, detail:up:out of auth scope;UP:3/401”?是不是我生成的token不对?
policy = qiniu.rs.PutPolicy(bucket_name) extra = qiniu.resumable_io.PutExtra(bucket_name) uptoken = policy.token() ret, err = qiniu.resumable_io.put_file(uptoken, file_name, file,extra)
bucketname 的值是不是用了 <bucket>:<key>这种形式?
这种情况bucketname不是一个单纯的空间名,构建PutExtra时会导致错误。建议使用以下处理:
bucket_name = 'xxxx' key = 'yyy' scope = '%s:%s' % (bucket_name, key) policy = qiniu.rs.PutPolicy(scope) extra = qiniu.resumable_io.PutExtra(bucket_name) ...
file_name 能够打印下么?是不是合法的 utf8 字符串?
编橙之家文章,
相关内容
- 请问python调用命令行是否能获取PID,pythonpid,python写了一
- Python2.6升级到Python2.7没有MySQL库求解决方式,python2.6p
- Python多个目录更新问题求助,python多个问题求助,from
- Python用经度纬度查询天气什么方式好,python经度,有没有
- 请问SAE用第三方提示:ImportError: No module named feedparser,
- windows7系统中python环境变量原始path误清除了,还能恢复
- 请教python返回值变量对象的问题,有源码,python返回值
- 安卓app用java写适合还是其它语言更适合,安卓app,其他
- 请教Python类中闭包出错原因,python出错,class yoyo(o
- Python \"(.*?)\"正则表达式含义是?,python正则表达式
评论关闭