# Error running python sdk proxy example

**URL:** <https://openziti.discourse.group/t/error-running-python-sdk-proxy-example/5695>\
**Category:** Support\
**Created:** [March 13, 2026, 1:05pm UTC](https://openziti.discourse.group/t/error-running-python-sdk-proxy-example/5695 "2026-03-13T13:05:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![milselarch](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/milselarch/32/3890_2.png) [@milselarch](https://openziti.discourse.group/u/milselarch)\
**Post date:** [March 13, 2026, 1:05pm UTC](https://openziti.discourse.group/t/error-running-python-sdk-proxy-example/5695/1 "2026-03-13T13:05:31Z")

</div>

Hi so I tried running the proxy example in [zrok/sdk/python/examples/proxy/proxy.py at main · openziti/zrok · GitHub](https://github.com/openziti/zrok/blob/main/sdk/python/examples/proxy/proxy.py) and encountered the following error: `TypeError: (<openziti.context.ZitiContext object at 0x7cc2c35fdeb0>, 0) is not a ZitiContext or str instance`

For context heres the full stack trace:  
`$ python proxy_test.py ``http://127.0.0.1:3000`  
`2026-03-13 20:59:25,750 - ` **`main`** ` - INFO - === Starting proxy server ===`  
`2026-03-13 20:59:25,750 - ` **`main`** ` - INFO - Target URL: ``http://127.0.0.1:3000`  
`2026-03-13 20:59:25,750 - ` **`main`** ` - INFO - Share mode: public`  
`2026-03-13 20:59:29,837 - ` **`main`** ` - INFO - Access proxy at: ``https://is25s1nl69lh.share.zrok.io`  
`Traceback (most recent call last):`  
`File "/home/milselarch/projects/zrok_startup/proxy_test.py", line 66, in `  
`main()`  
`File "/home/milselarch/projects/zrok_startup/proxy_test.py", line 62, in main`  
`proxy_share.run()`  
`File "/home/milselarch/projects/zrok_startup/venv/lib/python3.12/site-packages/zrok/proxy.py", line 193, in run`  
`run_server()`  
`File "/home/milselarch/projects/zrok_startup/venv/lib/python3.12/site-packages/zrok/decor.py", line 31, in zrockified`  
`func(*args, **kwargs)`  
`File "/home/milselarch/projects/zrok_startup/venv/lib/python3.12/site-packages/zrok/proxy.py", line 191, in run_server`  
`serve(self._app, port=DUMMY_PORT, _quiet=True)`  
`File "/home/milselarch/projects/zrok_startup/venv/lib/python3.12/site-packages/waitress/` **`init`** `.py", line 13, in serve`  
`server = _server(app, **kw)`  
`^^^^^^^^^^^^^^^^^^`  
`File "/home/milselarch/projects/zrok_startup/venv/lib/python3.12/site-packages/waitress/server.py", line 78, in create_server`  
`last_serv = TcpWSGIServer(`  
`^^^^^^^^^^^^^^`  
`File "/home/milselarch/projects/zrok_startup/venv/lib/python3.12/site-packages/waitress/server.py", line 243, in ` **`init`**  
`self.bind_server_socket()`  
`File "/home/milselarch/projects/zrok_startup/venv/lib/python3.12/site-packages/waitress/server.py", line 364, in bind_server_socket`  
`self.bind(sockaddr)`  
`File "/home/milselarch/projects/zrok_startup/venv/lib/python3.12/site-packages/waitress/wasyncore.py", line 374, in bind`  
`return self.socket.bind(addr)`  
`^^^^^^^^^^^^^^^^^^^^^^`  
`File "/home/milselarch/projects/zrok_startup/venv/lib/python3.12/site-packages/openziti/zitisock.py", line 97, in bind`  
`ztx = context.get_context(cfg['ztx'], timeout=cfg.get('timeout', 0))`  
`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^`  
`File "/home/milselarch/projects/zrok_startup/venv/lib/python3.12/site-packages/openziti/context.py", line 119, in get_context`  
`raise TypeError(f'{ztx} is not a ZitiContext or str instance')`  
`TypeError: (<openziti.context.ZitiContext object at 0x7cc2c35fdeb0>, 0) is not a ZitiContext or str instance`  
`2026-03-13 20:59:39,158 - zrok.proxy - INFO - Share is25s1nl69lh released`

Python version: 3.12.3  
Operating System: Ubuntu 24.04  
zrok library version: 1.1.11

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [March 17, 2026, 12:14pm UTC](https://openziti.discourse.group/t/error-running-python-sdk-proxy-example/5695/2 "2026-03-17T12:14:26Z")

</div>

Hi @milselarch welcome to the community and to OpenZiti!

Sorry for the delay, it's a busy time for us all here at with the OpenZiti project and within NetFoundry on the whole. When an issue comes in that takes a bit of time to try to understand, it's harder for us to reply quickly.

What zrok controller/frontend versions are you running and what versions of OpenZiti are you running? You're just trying to get the sample to run, right?

---

<div class="post-metadata">

**Author:** ![milselarch](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/milselarch/32/3890_2.png) [@milselarch](https://openziti.discourse.group/u/milselarch)\
**Post date:** [April 13, 2026, 4:39am UTC](https://openziti.discourse.group/t/error-running-python-sdk-proxy-example/5695/3 "2026-04-13T04:39:43Z")

</div>

Hi @TheLumberjack thanks for getting back to me

Yeah i am just trying to get the sample to run.

The version of zrok im using is 1.1.11, I don’t think I am running any zrok controller / frontend, or OpenZiti, cause I was expecting to connect to the zrok servers hosted at my [myzrok.io](http://myzrok.io) rather than self-hosting?

---

<div class="post-metadata">

**Author:** ![michael.quigley](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/michael.quigley/32/1123_2.png) [@michael.quigley](https://openziti.discourse.group/u/michael.quigley)\
**Post date:** [April 15, 2026, 1:43pm UTC](https://openziti.discourse.group/t/error-running-python-sdk-proxy-example/5695/4 "2026-04-15T13:43:55Z")

</div>

I don't believe the python SDK for v1.1 is functional. If possible, have a look at the python sdk for v2. It's significantly improved.
