aliyun / aliyun/aliyun-openapi-python-sdk
TypeError: unsupported operand type(s) for +: 'type' and 'str'
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1k
- Forks
- 578
- PR merge metrics
- No merged PRs in 30d
Description
- Python Version: 3.9.7
- aliyunsdkcore Version: 2.13.35
- API: UpdateDomainRecordRequest
TypeError: unsupported operand type(s) for +: 'type' and 'str'
Stack:
Traceback (most recent call last):
File "c:\Codes\Web\ddns\ddns.py", line 38, in <module>
response = client.do_action_with_exception(request)
File "C:\Program Files\Python39\lib\site-packages\aliyunsdkcore\client.py", line 498, in do_action_with_exception
status, headers, body, exception = self._implementation_of_do_action(acs_request)
File "C:\Program Files\Python39\lib\site-packages\aliyunsdkcore\client.py", line 333, in _implementation_of_do_action
return self._handle_retry_and_timeout(endpoint, request, signer)
File "C:\Program Files\Python39\lib\site-packages\aliyunsdkcore\client.py", line 401, in _handle_retry_and_timeout
status, headers, body, exception = self._handle_single_request(endpoint,
File "C:\Program Files\Python39\lib\site-packages\aliyunsdkcore\client.py", line 423, in _handle_single_request
http_response = self._make_http_response(endpoint, request, read_timeout, connect_timeout,
File "C:\Program Files\Python39\lib\site-packages\aliyunsdkcore\client.py", line 286, in _make_http_response
header, url = signer.sign(self._region_id, request)
File "C:\Program Files\Python39\lib\site-packages\aliyunsdkcore\auth\signers\access_key_signer.py", line 35, in sign
url = request.get_url(region_id, cred.access_key_id, cred.access_key_secret)
File "C:\Program Files\Python39\lib\site-packages\aliyunsdkcore\request.py", line 324, in get_url
url, string_to_sign = rpc_signer.get_signed_url(
File "C:\Program Files\Python39\lib\site-packages\aliyunsdkcore\auth\composer\rpc_signature_composer.py", line 76, in get_signed_url
signature = __get_signature(string_to_sign, secret, signer)
File "C:\Program Files\Python39\lib\site-packages\aliyunsdkcore\auth\composer\rpc_signature_composer.py", line 68, in __get_signature
return signer.get_sign_string(string_to_sign, secret + '&')
TypeError: unsupported operand type(s) for +: 'type' and 'str'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with aliyunsdkcore/auth/composer/rpc_signature_composer.py at __get_signature and trace how the signer reaches it from auth/signers/access_key_signer.py and request.py. Reproduce the UpdateDomainRecordRequest case on Python 3.9.7 with aliyunsdkcore 2.13.35; done means the reported TypeError no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100