{"id":28336,"library":"tencentcloud-sdk-python-gme","title":"Tencent Cloud Game Multimedia Engine (GME) Python SDK","description":"Official Python SDK for Tencent Cloud Game Multimedia Engine (GME), enabling voice chat, voice message, and voice recognition services. Current version 3.1.42. Release cadence is irregular, typically following the main tencentcloud-sdk-python releases.","status":"active","version":"3.1.42","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencent-cloud","gme","voice","game-multimedia-engine","sdk"],"install":[{"cmd":"pip install tencentcloud-sdk-python-gme","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Common SDK components (authentication, HTTP transport)","package":"tencentcloud-sdk-python-common","optional":false}],"imports":[{"note":"GmeClient is in the module namespace, not directly in tencentcloud.gme.","wrong":"from tencentcloud.gme import GmeClient","symbol":"GmeClient","correct":"from tencentcloud.gme.v20180711 import gme_client as gme_client_module"},{"note":"Versioned API (v20180711) must be included; older import is broken.","wrong":"from tencentcloud.gme import models","symbol":"DescribeApplicationDataRequest","correct":"from tencentcloud.gme.v20180711 import models"}],"quickstart":{"code":"from tencentcloud.common import credential\nfrom tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\nfrom tencentcloud.gme.v20180711 import gme_client, models\n\nSecretId = os.environ.get('SECRET_ID', '')\nSecretKey = os.environ.get('SECRET_KEY', '')\ncred = credential.Credential(SecretId, SecretKey)\nclient = gme_client.GmeClient(cred, \"ap-guangzhou\")\nreq = models.DescribeApplicationDataRequest()\nreq.AppId = \"your_app_id\"\ntry:\n    resp = client.DescribeApplicationData(req)\n    print(resp.to_json_string())\nexcept TencentCloudSDKException as err:\n    print(err)","lang":"python","description":"Initialize client and call DescribeApplicationData with credentials from environment variables."},"warnings":[{"fix":"Always use the full import path: tencentcloud.gme.v20180711.gme_client","message":"In version 3.0+, the API module version must be specified (e.g., gme.v20180711). Omitting the version causes import errors.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"cred = credential.Credential(SecretId, SecretKey); client = gme_client.GmeClient(cred, 'ap-guangzhou')","message":"The credential.Credential() constructor with three arguments (including region) is deprecated. Use Credential(SecretId, SecretKey) and pass region to client separately.","severity":"deprecated","affected_versions":">=3.1.0"},{"fix":"Use json.dumps(resp, default=lambda o: o.__dict__) or convert to dict via vars() before serialization.","message":"Many GME API response objects contain nested structures; calling to_json_string() fails if the object has unset optional fields. Use json.dumps with custom encoder to avoid AttributeError.","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":"from tencentcloud.gme.v20180711 import gme_client; then use gme_client.GmeClient","cause":"Incorrect import path; GmeClient is inside the versioned submodule.","error":"ImportError: cannot import name 'GmeClient' from 'tencentcloud.gme'"},{"fix":"from tencentcloud.common import credential; cred = credential.Credential(SecretId, SecretKey)","cause":"Importing credential incorrectly; use credential.Credential, not credential.","error":"AttributeError: module 'tencentcloud.common.credential' has no attribute 'Credential'"},{"fix":"Set SECRET_ID and SECRET_KEY environment variables, or hardcode valid credentials for testing.","cause":"SecretId or SecretKey is incorrect or not set.","error":"TencentCloudSDKException: [TencentCloudSDKException] code: UnauthorizedOperation message: Invalid secretId"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}