# Cannot connect by Python SDK

**URL:** <https://community.temporal.io/t/cannot-connect-by-python-sdk/6069>\
**Category:** Community Support\
**Tags:** python-sdk, general-impl\
**Created:** [September 28, 2022, 1:41am UTC](https://community.temporal.io/t/cannot-connect-by-python-sdk/6069 "2022-09-28T01:41:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JerryHu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/jerryhu/32/2609_2.png) [@JerryHu](https://community.temporal.io/u/JerryHu)\
**Post date:** [September 28, 2022, 1:41am UTC](https://community.temporal.io/t/cannot-connect-by-python-sdk/6069/1 "2022-09-28T01:41:24Z")

</div>

Hi all,

I’ve set up the temporal server v1.16.2 and can properly execute workflows via Java SDK or run tctl commands. Somehow python client does not work due to connection problem? Any suggestions on the failure? Thanks!

Using an example from [GitHub - temporalio/sdk-python: Temporal Python SDK](https://github.com/temporalio/sdk-python)

Errors are like

File “/home/ubuntu/env/lib/python3.7/site-packages/temporalio/bridge/client.py”, line 74, in connect  
await temporalio.bridge.temporal\_sdk\_bridge.connect\_client(config)  
RuntimeError: Failed client connect: `get_system_info` call error after connection: Status { code: Unknown, message: “transport error”, source: Some(tonic::transport::Error(Transport, hyper::Error(Http2, Error { kind: GoAway(b"", FRAME\_SIZE\_ERROR, Library) })))}

Best,  
Jerry

---

<div class="post-metadata">

**Author:** ![antonio.perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/antonio.perez/32/2417_2.png) [@antonio.perez](https://community.temporal.io/u/antonio.perez)\
**Post date:** [September 28, 2022, 9:59am UTC](https://community.temporal.io/t/cannot-connect-by-python-sdk/6069/2 "2022-09-28T09:59:35Z")

</div>

Hello @JerryHu

To try to reproduce the issue, could you point out, which example you are using?

There are more python examples in this repository [GitHub - temporalio/samples-python: Samples for working with the Temporal Python SDK](https://github.com/temporalio/samples-python), just in case you don’t know about them

---

<div class="post-metadata">

**Author:** ![JerryHu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/jerryhu/32/2609_2.png) [@JerryHu](https://community.temporal.io/u/JerryHu)\
**Post date:** [September 28, 2022, 12:56pm UTC](https://community.temporal.io/t/cannot-connect-by-python-sdk/6069/3 "2022-09-28T12:56:54Z")

</div>

Hi @antonio.perez,

Thanks for replying! I use the sample code from python sdk github page. It errors out at this line

client = await Client.connect(“\<our\_temporal\_elb\>:7233”)

RuntimeError: Failed client connect: `get_system_info` call error after connection: Status { code: Unknown, message: “transport error”, source: Some(tonic::transport::Error(Transport, hyper::Error(Http2, Error { kind: GoAway(b"", FRAME\_SIZE\_ERROR, Library) })))}

Seems it’s related to Http2?

```auto
import asyncio
from datetime import datetime, timedelta
from temporalio import workflow, activity
from temporalio.client import Client
from temporalio.worker import Worker

@activity.defn
async def say_hello(name: str) -> str:
    return f"Hello, {name}!"

@workflow.defn
class SayHello:
    @workflow.run
    async def run(self, name: str) -> str:
        return await workflow.execute_activity(
            say_hello, name, schedule_to_close_timeout=timedelta(seconds=5)
        )

async def main():
    # Create client connected to server at the given address
    client = await Client.connect("localhost:7233")

    # Run the worker
    worker = Worker(client, task_queue="my-task-queue", workflows=[SayHello], activities=[say_hello])
    await worker.run()

if __name__ == " __main__":
    asyncio.run(main())

```

---

<div class="post-metadata">

**Author:** ![JerryHu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/jerryhu/32/2609_2.png) [@JerryHu](https://community.temporal.io/u/JerryHu)\
**Post date:** [September 28, 2022, 2:14pm UTC](https://community.temporal.io/t/cannot-connect-by-python-sdk/6069/4 "2022-09-28T14:14:44Z")

</div>

Figured out. Need to set tls=True to connect as we turned on TLS on server side.
