From 37b8305907640665a713955e718a7efd9506847d Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 6 Jul 2023 11:45:33 +0800 Subject: [PATCH] docs: add exception catching to connect() --- docs/examples/python/develop_tutorial.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/examples/python/develop_tutorial.py b/docs/examples/python/develop_tutorial.py index 9d2b35e8b2..7862ff0e44 100644 --- a/docs/examples/python/develop_tutorial.py +++ b/docs/examples/python/develop_tutorial.py @@ -10,7 +10,10 @@ import os url = os.environ["TDENGINE_CLOUD_URL"] token = os.environ["TDENGINE_CLOUD_TOKEN"] -conn = taosrest.connect(url=url, token=token) +try: + conn = taosrest.connect(url=url, token=token) +except Exception as e: + print(str(e)) # ANCHOR_END: connect # ANCHOR: insert # create super table -- GitLab