This topic lists the causes and solutions for some common errors you may experience when you use the Alibaba Cloud SDK.

Error code Error message Cause Solution
SDK.InvalidRegionId Can not find endpoint to access. The error message returned because the SDK cannot access the endpoint of the service in the specified region. Check whether the specified region ID and endpoint are correct. After you have obtained the endpoint, you can run the following code to set the endpoint:
from aliyunsdkcore.profile import region_provider
region_provider.modify_point('Ecs', 'cn-zhangjiakou', 'ecs.aliyuncs.com')
SDK.TimeoutError N/A The error message returned because the request has timed out and all retry attempts have failed.
  • If your network condition is poor, or you need to make cross-region requests, we recommend that you increase the timeout period or increase the maximum number of retries.

  • If the problem persists due to reasons other than poor network conditions, submit a ticket.

SDK.ServerError: InvalidProtocol.NeedSsl Your request is denied as lack of ssl protect.Recommend:https://error-center.aliyun.com/status/search?Keyword=InvalidProtocol.NeedSsl&source=PopGw The error message returned because the API only supports HTTPS requests. Before you send the request, add the following code:
request.set_protocol_type('https')