Comments (2)
遇到了同样的问题。
解决方案:
把import urllib2 删掉
把所有print加括号
quote, reduce没有加上这两行
from urllib.request import quote
from functools import reduce
dict相关:
没有has_key, 改成 key in dict
没有iteritems, 改成items
str, bytes相关:
这个有点2 把hmac那一坨稍微改一下
key = bytes(self.secret_key, encoding='utf-8')
source = bytes(source, encoding='utf-8')
sign = hmac.new(key, source, hashlib.sha1).digest()
sign = base64.b64encode(sign)
sign = str(sign, encoding='utf-8').rstrip()
from qcloud-cos-sts-sdk.
楼上正解,hmac那段需要手工改(+import base64),其他的 2to3 -w sts.py 就好了。
from qcloud-cos-sts-sdk.
Related Issues (20)
- nodejs sdk npm install 下来之后跟文档完全不一致
- Nodejs SDK 需要升级,多个依赖库已被弃用 HOT 1
- In the generated .d.ts file, there is no parameter region in the interface GetCredentialOptions (on v3.1.0)
- 永远是不在签名 q-key-time 有效时间范围内. HOT 1
- nodejs [email protected] This package has been deprecated
- 获取 sts 一直报AuthFailure.SignatureFailure HOT 8
- 是否支持.net framework 4.0及以下版本? HOT 2
- 这sdk设计的糟糕透了
- SDK设计问题
- + 这个符号的url encode结果与你们客户端SDK的可能存在差异,导致签名不匹配
- The provided credentials could not be validated. Please check your signature is correct. HOT 1
- 测试过吗??
- pip3 uninstall qcloud-python-sts 出现问题
- 如何限制上传的文件大小? HOT 1
- python 按照包时候,出现报错gbk can't decode HOT 2
- "STS.getCredential Method is invalid
- "STS.getCredential"
- php8.1版本在使用cos生成key时函数rawurlencode报错 HOT 1
- windows安装出现gbk编码错误的临时解决方法 HOT 1
- 使用的phpSDK,按照sdk源码来运行报错strpos() expects parameter 1 to be string, array given HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qcloud-cos-sts-sdk.