aliyunsdkcore/auth/signers/ecs_ram_role_signer TypeError
https://github.com/aliyun/aliyun-openapi-python-sdk/blob/f0b2a41e01ea09e552a23720bf0f757bfcb37291/aliyun-python-sdk-core/aliyunsdkcore/auth/signers/ecs_ram_role_signer.py#L54
Summary Python script used for pushing custom metric to Cloud Monitor which is executed from an ECS instance within a scaling group. The python script uses the EcsRamRoleSigner for authentication
The Error The Signer automatically calls the def _check_session_credential(self) on subsequent API calls, but this function fails with the following error:
Traceback (most recent call last):
File "c:\push_metric\push_custom_metric.py", line 166, in
Reason
self._expiration is not an int, it is a datetime unicode string with the following format: 2019-01-14T13:45:02Z
Temporary workaround
Changing line 54 to if now >= (time.mktime(exp_date):
Thanks for your feedback, we will fix this problem as soon as possible.
Encountered this bug with our service as well. I think this bug was fixed with https://github.com/aliyun/aliyun-openapi-python-sdk/commit/d58094fc58bad4, so hopefully out in the next release
Hi, this bug has been fixed in our newest version, please update your aliyun-python-sdk-core and try again. Thank you, and have a good day!
Hello, @wallisyan, we have this issue when using aliyun-python-sdk-core==2.12.0 which appears to be the latest release on PyPi (released Jan 11th, 2019). https://pypi.org/project/aliyun-python-sdk-core/#history
Is there a new version out already or coming out soon that will include commit https://github.com/aliyun/aliyun-openapi-python-sdk/commit/d58094f (which was committed after 2.12.0 on Jan 25)?
Sorry for the late response. The latest version 2.13.0 released on Feb 1.