{"id":28325,"library":"tencentcloud-sdk-python-ba","title":"Tencent Cloud Ba SDK","description":"Tencent Cloud Ba SDK enables interaction with Tencent Cloud's Ba (Business Analytics) services. Current version 3.0.1459, released regularly via PyPI. The SDK is auto-generated and follows the main tencentcloud-sdk-python pattern.","status":"active","version":"3.0.1459","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencent cloud","sdk","ba","business analytics"],"install":[{"cmd":"pip install tencentcloud-sdk-python-ba","lang":"bash","label":"Install Ba SDK"}],"dependencies":[],"imports":[{"note":"Versioned import path required. The module path changed after 3.0.1000.","wrong":"from tencentcloud.ba import BaClient","symbol":"BaClient","correct":"from tencentcloud.ba.v20200720 import ba_client"}],"quickstart":{"code":"from tencentcloud.common import credential\nfrom tencentcloud.ba.v20200720 import ba_client, models\nfrom tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\n\ncred = credential.Credential(\n    secret_id=os.environ.get('TENCENTCLOUD_SECRET_ID', ''),\n    secret_key=os.environ.get('TENCENTCLOUD_SECRET_KEY', '')\n)\nclient = ba_client.BaClient(cred, 'ap-guangzhou')\ntry:\n    req = models.DescribeBaApisRequest()\n    resp = client.DescribeBaApis(req)\n    print(resp.to_json_string())\nexcept TencentCloudSDKException as e:\n    print(e)","lang":"python","description":"Instantiate BaClient with credentials and call a sample API."},"warnings":[{"fix":"Use the full versioned module path: from tencentcloud.ba.v20200720 import ba_client, models","message":"Import path must include version date. The correct import is from tencentcloud.ba.v20200720 import ba_client, not from tencentcloud.ba import ba_client.","severity":"gotcha","affected_versions":">=3.0.1000"},{"fix":"Use from tencentcloud.common import credential; cert = credential.Credential(secret_id, secret_key)","message":"The old credential class 'Cred' (from tencentcloud.common.credential) has been renamed to 'Credential'.","severity":"deprecated","affected_versions":">=3.0.800"},{"fix":"Always provide a valid region string, e.g., client = BaClient(cred, 'ap-guangzhou')","message":"Region parameter in client constructor must be a valid Tencent Cloud region string (e.g., 'ap-guangzhou'). Passing None or empty string will cause 'Region is missing' error.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"pip install tencentcloud-sdk-python-ba","cause":"Missing or wrong package name. Users sometimes install 'tencentcloud-sdk-python' meta-package instead of the specific service package.","error":"ModuleNotFoundError: No module named 'tencentcloud.ba'"},{"fix":"Verify the available methods in the Ba client. The correct method names are defined in models. For example, use client.DescribeBaApis() not client.DescribeInstances().","cause":"Calling an API method that does not exist in the Ba service. Possibly a typo or using a method from another service.","error":"tencentcloud.common.exception.TencentCloudSDKException: [TencentCloudSDKException] code: UnsupportedOperation, message: This action not supported."},{"fix":"Use from tencentcloud.ba.v20200720 import ba_client","cause":"Using an old, incorrect module path without version date (e.g., from tencentcloud.ba import BaClient). The SDK restructured around v3.0.1000.","error":"KeyError: 'BA'"},{"fix":"pip install --upgrade tencentcloud-sdk-python-ba","cause":"The package is not installed or is an outdated version (<3.0.1000).","error":"AttributeError: module 'tencentcloud.ba' has no attribute 'v20200720'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}