GithubHelp home page GithubHelp logo

lewoudar / ws Goto Github PK

View Code? Open in Web Editor NEW
56.0 2.0 1.0 525 KB

The simplest websocket cli

Home Page: https://pyws.readthedocs.io/en/latest/

License: Apache License 2.0

Python 100.00%
python anyio asyncio cli rich trio websocket

ws's Introduction

Hello World! ๐Ÿ‘‹

Hi, Iโ€™m Kevin Tewouda also known as "le woudar".

I'm a python developer passionate about web programming and networking. I am a lifelong student who is always looking for ways to improve my daily skills. I like to create things, this is why I spend part of my free time contributing to open source with my projects.

Currently my field of interest is structured concurrency and I hope it will be widespread within a few years. If you are passing by, don't hesitate to have a look at my projects. ๐Ÿ˜œ

For networking stuff and concurrency, anyio is probably what you are looking for. In any case I enjoy using it.

Aw, I also want to mention that IMHO Django is the best web framework ever realized in the python landscape, though the combination FastAPI + Tortoise ORM / ormar is also sweet ๐Ÿ˜‹.

You can follow me on other social medias where I shared what I have learned in tech and more ๐Ÿ˜Š

See you soon!

ws's People

Contributors

dependabot[bot] avatar lewoudar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

zedai00

ws's Issues

HandshakeError after run 'ws listen ws://localhost:8000/hello' on macOS

ws --version
ws version 0.1.0

python3 --version
Python 3.10.13

`ws listen ws://localhost:8000/hello ๎‚ฒ โœ” ๎‚ฒ 9657 ๎‚ฒ 21:58:08
ExceptionGroup: all attempts to connect to localhost:8000 failed (2 sub-exceptions)

The above exception was the direct cause of the following exception:

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/trio_websocket/_impl.py:120 in โ”‚
โ”‚ open_websocket โ”‚
โ”‚ โ”‚
โ”‚ 117 โ”‚ async with trio.open_nursery() as new_nursery: โ”‚
โ”‚ 118 โ”‚ โ”‚ try: โ”‚
โ”‚ 119 โ”‚ โ”‚ โ”‚ with trio.fail_after(connect_timeout): โ”‚
โ”‚ โฑ 120 โ”‚ โ”‚ โ”‚ โ”‚ connection = await connect_websocket(new_nursery, host, port, โ”‚
โ”‚ 121 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ resource, use_ssl=use_ssl, subprotocols=subprotocols, โ”‚
โ”‚ 122 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ extra_headers=extra_headers, โ”‚
โ”‚ 123 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ message_queue_size=message_queue_size, โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ connect_timeout = 5.0 โ”‚ โ”‚
โ”‚ โ”‚ disconnect_timeout = 5.0 โ”‚ โ”‚
โ”‚ โ”‚ extra_headers = None โ”‚ โ”‚
โ”‚ โ”‚ host = 'localhost' โ”‚ โ”‚
โ”‚ โ”‚ max_message_size = 1048576 โ”‚ โ”‚
โ”‚ โ”‚ message_queue_size = 1 โ”‚ โ”‚
โ”‚ โ”‚ new_nursery = <trio.Nursery object at 0x105ddcbb0> โ”‚ โ”‚
โ”‚ โ”‚ port = 8000 โ”‚ โ”‚
โ”‚ โ”‚ resource = '/hello' โ”‚ โ”‚
โ”‚ โ”‚ subprotocols = None โ”‚ โ”‚
โ”‚ โ”‚ use_ssl = False โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/trio_websocket/_impl.py:183 in โ”‚
โ”‚ connect_websocket โ”‚
โ”‚ โ”‚
โ”‚ 180 โ”‚ logger.debug('Connecting to ws%s://%s:%d%s', โ”‚
โ”‚ 181 โ”‚ โ”‚ '' if ssl_context is None else 's', host, port, resource) โ”‚
โ”‚ 182 โ”‚ if ssl_context is None: โ”‚
โ”‚ โฑ 183 โ”‚ โ”‚ stream = await trio.open_tcp_stream(host, port) โ”‚
โ”‚ 184 โ”‚ else: โ”‚
โ”‚ 185 โ”‚ โ”‚ stream = await trio.open_ssl_over_tcp_stream(host, port, โ”‚
โ”‚ 186 โ”‚ โ”‚ โ”‚ ssl_context=ssl_context, https_compatible=True) โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ extra_headers = None โ”‚ โ”‚
โ”‚ โ”‚ host = 'localhost' โ”‚ โ”‚
โ”‚ โ”‚ max_message_size = 1048576 โ”‚ โ”‚
โ”‚ โ”‚ message_queue_size = 1 โ”‚ โ”‚
โ”‚ โ”‚ nursery = <trio.Nursery object at 0x105ddcbb0> โ”‚ โ”‚
โ”‚ โ”‚ port = 8000 โ”‚ โ”‚
โ”‚ โ”‚ resource = '/hello' โ”‚ โ”‚
โ”‚ โ”‚ ssl_context = None โ”‚ โ”‚
โ”‚ โ”‚ subprotocols = None โ”‚ โ”‚
โ”‚ โ”‚ use_ssl = False โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/trio/_highlevel_open_tcp_stream.py:403 โ”‚
โ”‚ in open_tcp_stream โ”‚
โ”‚ โ”‚
โ”‚ 400 โ”‚ โ”‚ if winning_socket is None: โ”‚
โ”‚ 401 โ”‚ โ”‚ โ”‚ assert len(oserrors) == len(targets) โ”‚
โ”‚ 402 โ”‚ โ”‚ โ”‚ msg = f"all attempts to connect to {format_host_port(host, port)} failed" โ”‚
โ”‚ โฑ 403 โ”‚ โ”‚ โ”‚ raise OSError(msg) from ExceptionGroup(msg, oserrors) โ”‚
โ”‚ 404 โ”‚ โ”‚ else: โ”‚
โ”‚ 405 โ”‚ โ”‚ โ”‚ stream = trio.SocketStream(winning_socket) โ”‚
โ”‚ 406 โ”‚ โ”‚ โ”‚ open_sockets.remove(winning_socket) โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ _ = '' โ”‚ โ”‚
โ”‚ โ”‚ addr = ('127.0.0.1', 8000) โ”‚ โ”‚
โ”‚ โ”‚ address_family = <AddressFamily.AF_INET: 2> โ”‚ โ”‚
โ”‚ โ”‚ attempt_connect = <function open_tcp_stream..attempt_connect at 0x105dd8700> โ”‚ โ”‚
โ”‚ โ”‚ attempt_failed = Event(_tasks=set(), _flag=True) โ”‚ โ”‚
โ”‚ โ”‚ happy_eyeballs_delay = 0.25 โ”‚ โ”‚
โ”‚ โ”‚ host = 'localhost' โ”‚ โ”‚
โ”‚ โ”‚ local_address = None โ”‚ โ”‚
โ”‚ โ”‚ msg = 'all attempts to connect to localhost:8000 failed' โ”‚ โ”‚
โ”‚ โ”‚ nursery = <trio.Nursery object at 0x105ddc4f0> โ”‚ โ”‚
โ”‚ โ”‚ open_sockets = { โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ <trio.socket.socket [closed] fd=-1, โ”‚ โ”‚
โ”‚ โ”‚ family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ <trio.socket.socket [closed] fd=-1, family=AddressFamily.AF_INET, โ”‚ โ”‚
โ”‚ โ”‚ type=SocketKind.SOCK_STREAM, proto=6> โ”‚ โ”‚
โ”‚ โ”‚ } โ”‚ โ”‚
โ”‚ โ”‚ oserrors = [ โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ConnectionRefusedError(61, "Error connecting to ('::1', 8000, 0, โ”‚ โ”‚
โ”‚ โ”‚ 0): Connection refused"), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ConnectionRefusedError(61, "Error connecting to ('127.0.0.1', โ”‚ โ”‚
โ”‚ โ”‚ 8000): Connection refused") โ”‚ โ”‚
โ”‚ โ”‚ ] โ”‚ โ”‚
โ”‚ โ”‚ port = 8000 โ”‚ โ”‚
โ”‚ โ”‚ proto = 6 โ”‚ โ”‚
โ”‚ โ”‚ socket_type = <SocketKind.SOCK_STREAM: 1> โ”‚ โ”‚
โ”‚ โ”‚ targets = [ โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ <AddressFamily.AF_INET6: 30>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ <SocketKind.SOCK_STREAM: 1>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ 6, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ '', โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ ('::1', 8000, 0, 0) โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ <AddressFamily.AF_INET: 2>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ <SocketKind.SOCK_STREAM: 1>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ 6, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ '', โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ ('127.0.0.1', 8000) โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ) โ”‚ โ”‚
โ”‚ โ”‚ ] โ”‚ โ”‚
โ”‚ โ”‚ winning_socket = None โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
OSError: all attempts to connect to localhost:8000 failed

The above exception was the direct cause of the following exception:

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ /Users/sangshuduo/anaconda3/bin/ws:8 in โ”‚
โ”‚ โ”‚
โ”‚ 5 from ws.main import cli โ”‚
โ”‚ 6 if name == 'main': โ”‚
โ”‚ 7 โ”‚ sys.argv[0] = re.sub(r'(-script.pyw|.exe)?$', '', sys.argv[0]) โ”‚
โ”‚ โฑ 8 โ”‚ sys.exit(cli()) โ”‚
โ”‚ 9 โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ cli = โ”‚ โ”‚
โ”‚ โ”‚ re = <module 're' from '/Users/sangshuduo/anaconda3/lib/python3.10/re.py'> โ”‚ โ”‚
โ”‚ โ”‚ sys = <module 'sys' (built-in)> โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/click/core.py:1157 in call โ”‚
โ”‚ โ”‚
โ”‚ 1154 โ”‚ โ”‚
โ”‚ 1155 โ”‚ def call(self, *args: t.Any, **kwargs: t.Any) -> t.Any: โ”‚
โ”‚ 1156 โ”‚ โ”‚ """Alias for :meth:main.""" โ”‚
โ”‚ โฑ 1157 โ”‚ โ”‚ return self.main(*args, **kwargs) โ”‚
โ”‚ 1158 โ”‚
โ”‚ 1159 โ”‚
โ”‚ 1160 class Command(BaseCommand): โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ args = () โ”‚ โ”‚
โ”‚ โ”‚ kwargs = {} โ”‚ โ”‚
โ”‚ โ”‚ self = โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/click/core.py:1078 in main โ”‚
โ”‚ โ”‚
โ”‚ 1075 โ”‚ โ”‚ try: โ”‚
โ”‚ 1076 โ”‚ โ”‚ โ”‚ try: โ”‚
โ”‚ 1077 โ”‚ โ”‚ โ”‚ โ”‚ with self.make_context(prog_name, args, **extra) as ctx: โ”‚
โ”‚ โฑ 1078 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ rv = self.invoke(ctx) โ”‚
โ”‚ 1079 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ if not standalone_mode: โ”‚
โ”‚ 1080 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ return rv โ”‚
โ”‚ 1081 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ # it's not safe to ctx.exit(rv) here! โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ args = ['listen', 'ws://localhost:8000/hello'] โ”‚ โ”‚
โ”‚ โ”‚ complete_var = None โ”‚ โ”‚
โ”‚ โ”‚ ctx = <click.core.Context object at 0x1027953f0> โ”‚ โ”‚
โ”‚ โ”‚ extra = {} โ”‚ โ”‚
โ”‚ โ”‚ prog_name = 'ws' โ”‚ โ”‚
โ”‚ โ”‚ self = โ”‚ โ”‚
โ”‚ โ”‚ standalone_mode = True โ”‚ โ”‚
โ”‚ โ”‚ windows_expand_args = True โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/click/core.py:1688 in invoke โ”‚
โ”‚ โ”‚
โ”‚ 1685 โ”‚ โ”‚ โ”‚ โ”‚ super().invoke(ctx) โ”‚
โ”‚ 1686 โ”‚ โ”‚ โ”‚ โ”‚ sub_ctx = cmd.make_context(cmd_name, args, parent=ctx) โ”‚
โ”‚ 1687 โ”‚ โ”‚ โ”‚ โ”‚ with sub_ctx: โ”‚
โ”‚ โฑ 1688 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ return _process_result(sub_ctx.command.invoke(sub_ctx)) โ”‚
โ”‚ 1689 โ”‚ โ”‚ โ”‚
โ”‚ 1690 โ”‚ โ”‚ # In chain mode we create the contexts step by step, but after the โ”‚
โ”‚ 1691 โ”‚ โ”‚ # base command has been invoked. Because at that point we do not โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ _process_result = <function MultiCommand.invoke.._process_result at 0x10265fd90> โ”‚ โ”‚
โ”‚ โ”‚ args = [] โ”‚ โ”‚
โ”‚ โ”‚ cmd = โ”‚ โ”‚
โ”‚ โ”‚ cmd_name = 'listen' โ”‚ โ”‚
โ”‚ โ”‚ ctx = <click.core.Context object at 0x1027953f0> โ”‚ โ”‚
โ”‚ โ”‚ self = โ”‚ โ”‚
โ”‚ โ”‚ sub_ctx = <click.core.Context object at 0x105dddd80> โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/click/core.py:1434 in invoke โ”‚
โ”‚ โ”‚
โ”‚ 1431 โ”‚ โ”‚ โ”‚ echo(style(message, fg="red"), err=True) โ”‚
โ”‚ 1432 โ”‚ โ”‚ โ”‚
โ”‚ 1433 โ”‚ โ”‚ if self.callback is not None: โ”‚
โ”‚ โฑ 1434 โ”‚ โ”‚ โ”‚ return ctx.invoke(self.callback, **ctx.params) โ”‚
โ”‚ 1435 โ”‚ โ”‚
โ”‚ 1436 โ”‚ def shell_complete(self, ctx: Context, incomplete: str) -> t.List["CompletionItem"]: โ”‚
โ”‚ 1437 โ”‚ โ”‚ """Return a list of completions for the incomplete value. Looks โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ ctx = <click.core.Context object at 0x105dddd80> โ”‚ โ”‚
โ”‚ โ”‚ self = โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/click/core.py:783 in invoke โ”‚
โ”‚ โ”‚
โ”‚ 780 โ”‚ โ”‚ โ”‚
โ”‚ 781 โ”‚ โ”‚ with augment_usage_errors(__self): โ”‚
โ”‚ 782 โ”‚ โ”‚ โ”‚ with ctx: โ”‚
โ”‚ โฑ 783 โ”‚ โ”‚ โ”‚ โ”‚ return __callback(*args, **kwargs) โ”‚
โ”‚ 784 โ”‚ โ”‚
โ”‚ 785 โ”‚ def forward( โ”‚
โ”‚ 786 โ”‚ โ”‚ __self, __cmd: "Command", *args: t.Any, **kwargs: t.Any # noqa: B902 โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ _Context__callback = <function listen at 0x105764d30> โ”‚ โ”‚
โ”‚ โ”‚ _Context__self = <click.core.Context object at 0x105dddd80> โ”‚ โ”‚
โ”‚ โ”‚ args = () โ”‚ โ”‚
โ”‚ โ”‚ ctx = <click.core.Context object at 0x105dddd80> โ”‚ โ”‚
โ”‚ โ”‚ kwargs = { โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ 'url': 'ws://localhost:8000/hello', โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ 'is_json': False, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ 'duration': None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ 'filename': None โ”‚ โ”‚
โ”‚ โ”‚ } โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/ws/commands/listen.py:76 in listen โ”‚
โ”‚ โ”‚
โ”‚ 73 @filename_option โ”‚
โ”‚ 74 def listen(url: str, is_json: bool, duration: float, filename: str): โ”‚
โ”‚ 75 โ”‚ """Listens messages on a given URL.""" โ”‚
โ”‚ โฑ 76 โ”‚ trio.run(main, url, is_json, duration, filename) โ”‚
โ”‚ 77 โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ duration = None โ”‚ โ”‚
โ”‚ โ”‚ filename = None โ”‚ โ”‚
โ”‚ โ”‚ is_json = False โ”‚ โ”‚
โ”‚ โ”‚ url = 'ws://localhost:8000/hello' โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/trio/_core/_run.py:2275 in run โ”‚
โ”‚ โ”‚
โ”‚ 2272 โ”‚ if isinstance(runner.main_task_outcome, Value): โ”‚
โ”‚ 2273 โ”‚ โ”‚ return cast(RetT, runner.main_task_outcome.value) โ”‚
โ”‚ 2274 โ”‚ elif isinstance(runner.main_task_outcome, Error): โ”‚
โ”‚ โฑ 2275 โ”‚ โ”‚ raise runner.main_task_outcome.error โ”‚
โ”‚ 2276 โ”‚ else: # pragma: no cover โ”‚
โ”‚ 2277 โ”‚ โ”‚ raise AssertionError(runner.main_task_outcome) โ”‚
โ”‚ 2278 โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ args = ( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ 'ws://localhost:8000/hello', โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ False, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ None โ”‚ โ”‚
โ”‚ โ”‚ ) โ”‚ โ”‚
โ”‚ โ”‚ async_fn = <function main at 0x105764b80> โ”‚ โ”‚
โ”‚ โ”‚ clock = None โ”‚ โ”‚
โ”‚ โ”‚ gen = <generator object unrolled_run at 0x105df06d0> โ”‚ โ”‚
โ”‚ โ”‚ instruments = () โ”‚ โ”‚
โ”‚ โ”‚ next_send = [] โ”‚ โ”‚
โ”‚ โ”‚ prev_library = None โ”‚ โ”‚
โ”‚ โ”‚ restrict_keyboard_interrupt_to_checkpoints = False โ”‚ โ”‚
โ”‚ โ”‚ runner = Runner( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ clock=SystemClock( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ offset=162718.46147645527 โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ instruments={'_all': {}}, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ io_manager=KqueueIOManager( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _kqueue=<select.kqueue object at โ”‚ โ”‚
โ”‚ โ”‚ 0x1025ffbf0>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _registered={}, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ _force_wakeup=<trio._core._wakeup_socketpair.Wโ€ฆ โ”‚ โ”‚
โ”‚ โ”‚ object at 0x105ddce20>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _force_wakeup_fd=4 โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ki_manager=KIManager(handler=None), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ strict_exception_groups=False, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ _locals={ โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ : โ”‚ โ”‚
โ”‚ โ”‚ <trio.CapacityLimiter at 0x105dde710, 0/40 with โ”‚ โ”‚
โ”‚ โ”‚ 0 waiting> โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ }, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ runq=deque(), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ tasks=set(), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ deadlines=Deadlines(_heap=[], _active=0), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ init_task=Task( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _parent_nursery=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ coro=<coroutine object Runner.init at โ”‚ โ”‚
โ”‚ โ”‚ 0x105df0740>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _runner=..., โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ name='', โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ context=<_contextvars.Context object at โ”‚ โ”‚
โ”‚ โ”‚ 0x105deaa80>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _counter=0, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _next_send_fn=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _next_send=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _abort_func=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ custom_sleep_data=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _child_nurseries=[], โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _eventual_parent_nursery=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _cancel_points=3, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _schedule_points=4 โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ system_nursery=<trio.Nursery object at โ”‚ โ”‚
โ”‚ โ”‚ 0x105dde1d0>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ system_context=<_contextvars.Context object โ”‚ โ”‚
โ”‚ โ”‚ at 0x105dea180>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ main_task=Task( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _parent_nursery=<trio.Nursery object at โ”‚ โ”‚
โ”‚ โ”‚ 0x105dde260>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ coro=<coroutine object main at โ”‚ โ”‚
โ”‚ โ”‚ 0x105df07b0>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _runner=..., โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ name='ws.commands.listen.main', โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ context=<_contextvars.Context object at โ”‚ โ”‚
โ”‚ โ”‚ 0x105deac80>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _counter=1, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _next_send_fn=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _next_send=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _abort_func=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ custom_sleep_data=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _child_nurseries=[], โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _eventual_parent_nursery=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _cancel_points=1, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _schedule_points=1 โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ main_task_outcome=Error( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _unwrapped=False, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ error=HandshakeError() โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ entry_queue=EntryQueue( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ queue=deque(), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ idempotent_queue={}, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ wakeup=<trio._core._wakeup_socketpair.WakeupSoโ€ฆ โ”‚ โ”‚
โ”‚ โ”‚ object at 0x105ddd300>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ done=True, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ lock=<unlocked _thread.RLock object โ”‚ โ”‚
โ”‚ โ”‚ owner=0 count=0 at 0x105dea6c0> โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ trio_token=TrioToken( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ _reentry_queue=EntryQueue( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ queue=deque(), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ idempotent_queue={}, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ wakeup=<trio._core._wakeup_socketpair.WakeupSoโ€ฆ โ”‚ โ”‚
โ”‚ โ”‚ object at 0x105ddd300>, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ done=True, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ lock=<unlocked _thread.RLock object โ”‚ โ”‚
โ”‚ โ”‚ owner=0 count=0 at 0x105dea6c0> โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ ) โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ asyncgens=AsyncGenerators( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ alive=set(), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ trailing_needs_finalize=set(), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ prev_hooks=asyncgen_hooks(firstiter=None, โ”‚ โ”‚
โ”‚ โ”‚ finalizer=None) โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ), โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ clock_autojump_threshold=inf, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ is_guest=False, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ guest_tick_scheduled=False, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ ki_pending=False, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ waiting_for_idle=SortedDict({}) โ”‚ โ”‚
โ”‚ โ”‚ ) โ”‚ โ”‚
โ”‚ โ”‚ strict_exception_groups = False โ”‚ โ”‚
โ”‚ โ”‚ timeout = 0 โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/ws/commands/listen.py:60 in main โ”‚
โ”‚ โ”‚
โ”‚ 57 โ”‚
โ”‚ 58 โ”‚
โ”‚ 59 async def main(url: str, is_json: bool, duration: Optional[float] = None, filename: Opti โ”‚
โ”‚ โฑ 60 โ”‚ async with trio.open_nursery() as nursery: โ”‚
โ”‚ 61 โ”‚ โ”‚ nursery.start_soon(function_runner, nursery.cancel_scope, listen_messages, url, โ”‚
โ”‚ 62 โ”‚ โ”‚ nursery.start_soon(signal_handler, nursery.cancel_scope) โ”‚
โ”‚ 63 โ”‚ โ”‚ nursery.start_soon(sleep_until, nursery.cancel_scope, duration) โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ @TRIO_KI_PROTECTION_ENABLED = False โ”‚ โ”‚
โ”‚ โ”‚ duration = None โ”‚ โ”‚
โ”‚ โ”‚ filename = None โ”‚ โ”‚
โ”‚ โ”‚ is_json = False โ”‚ โ”‚
โ”‚ โ”‚ nursery = <trio.Nursery object at 0x105ddd4e0> โ”‚ โ”‚
โ”‚ โ”‚ url = 'ws://localhost:8000/hello' โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/trio/_core/_run.py:971 in aexit โ”‚
โ”‚ โ”‚
โ”‚ 968 โ”‚ โ”‚ โ”‚ # allow us to encapsulate this context fixup. โ”‚
โ”‚ 969 โ”‚ โ”‚ โ”‚ old_context = combined_error_from_nursery.context โ”‚
โ”‚ 970 โ”‚ โ”‚ โ”‚ try: โ”‚
โ”‚ โฑ 971 โ”‚ โ”‚ โ”‚ โ”‚ raise combined_error_from_nursery โ”‚
โ”‚ 972 โ”‚ โ”‚ โ”‚ finally: โ”‚
โ”‚ 973 โ”‚ โ”‚ โ”‚ โ”‚ _, value, _ = sys.exc_info() โ”‚
โ”‚ 974 โ”‚ โ”‚ โ”‚ โ”‚ assert value is combined_error_from_nursery โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ @TRIO_KI_PROTECTION_ENABLED = True โ”‚ โ”‚
โ”‚ โ”‚ etype = None โ”‚ โ”‚
โ”‚ โ”‚ exc = None โ”‚ โ”‚
โ”‚ โ”‚ old_context = OSError('all attempts to connect to localhost:8000 failed') โ”‚ โ”‚
โ”‚ โ”‚ self = NurseryManager(strict_exception_groups=False) โ”‚ โ”‚
โ”‚ โ”‚ tb = None โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/ws/utils/io.py:22 in function_runner โ”‚
โ”‚ โ”‚
โ”‚ 19 โ”‚
โ”‚ 20 โ”‚
โ”‚ 21 async def function_runner(scope: trio.CancelScope, function: Callable, *args: Any) -> No โ”‚
โ”‚ โฑ 22 โ”‚ await function(*args) โ”‚
โ”‚ 23 โ”‚ # noinspection PyAsyncCall โ”‚
โ”‚ 24 โ”‚ scope.cancel() โ”‚
โ”‚ 25 โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ @TRIO_KI_PROTECTION_ENABLED = False โ”‚ โ”‚
โ”‚ โ”‚ args = ('ws://localhost:8000/hello', False, None) โ”‚ โ”‚
โ”‚ โ”‚ function = <function listen_messages at 0x105764af0> โ”‚ โ”‚
โ”‚ โ”‚ scope = CancelScope( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ _cancel_status=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ _has_been_entered=True, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ _registered_deadline=inf, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ _cancel_called=True, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ cancelled_caught=True, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ _deadline=inf, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ _shield=False โ”‚ โ”‚
โ”‚ โ”‚ ) โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/ws/commands/listen.py:47 in โ”‚
โ”‚ listen_messages โ”‚
โ”‚ โ”‚
โ”‚ 44 async def listen_messages(url: str, is_json: bool, filename: Optional[str] = None) -> No โ”‚
โ”‚ 45 โ”‚ configure_console_recording(console, get_settings(), filename) โ”‚
โ”‚ 46 โ”‚ โ”‚
โ”‚ โฑ 47 โ”‚ async with websocket_client(url) as client: โ”‚
โ”‚ 48 โ”‚ โ”‚ while True: โ”‚
โ”‚ 49 โ”‚ โ”‚ โ”‚ message = await client.get_message() โ”‚
โ”‚ 50 โ”‚ โ”‚ โ”‚ is_bytes = isinstance(message, bytes) โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ filename = None โ”‚ โ”‚
โ”‚ โ”‚ is_json = False โ”‚ โ”‚
โ”‚ โ”‚ url = 'ws://localhost:8000/hello' โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/contextlib.py:199 in aenter โ”‚
โ”‚ โ”‚
โ”‚ 196 โ”‚ โ”‚ # they are only needed for recreation, which is not possible anymore โ”‚
โ”‚ 197 โ”‚ โ”‚ del self.args, self.kwds, self.func โ”‚
โ”‚ 198 โ”‚ โ”‚ try: โ”‚
โ”‚ โฑ 199 โ”‚ โ”‚ โ”‚ return await anext(self.gen) โ”‚
โ”‚ 200 โ”‚ โ”‚ except StopAsyncIteration: โ”‚
โ”‚ 201 โ”‚ โ”‚ โ”‚ raise RuntimeError("generator didn't yield") from None โ”‚
โ”‚ 202 โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ self = <contextlib._AsyncGeneratorContextManager object at 0x105ddc850> โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/ws/client.py:92 in websocket_client โ”‚
โ”‚ โ”‚
โ”‚ 89 โ”‚ ) โ”‚
โ”‚ 90 โ”‚ โ”‚
โ”‚ 91 โ”‚ try: โ”‚
โ”‚ โฑ 92 โ”‚ โ”‚ async with open_websocket_url(url, ssl_context=ssl_context, **arguments) as ws: โ”‚
โ”‚ 93 โ”‚ โ”‚ โ”‚ yield ws โ”‚
โ”‚ 94 โ”‚ except ConnectionTimeout: โ”‚
โ”‚ 95 โ”‚ โ”‚ console.print(f'[error]Unable to connect to {url}') โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ arguments = { โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ 'connect_timeout': 5.0, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ 'disconnect_timeout': 5.0, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ 'message_queue_size': 1, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ 'max_message_size': 1048576, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ 'extra_headers': None โ”‚ โ”‚
โ”‚ โ”‚ } โ”‚ โ”‚
โ”‚ โ”‚ settings = Settings( โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ connect_timeout=5.0, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ disconnect_timeout=5.0, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ response_timeout=5.0, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ message_queue_size=1, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ max_message_size=1048576, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ extra_headers=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ terminal_width=180, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ tls_ca_file=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ tls_certificate_file=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ tls_key_file=None, โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ tls_password=None โ”‚ โ”‚
โ”‚ โ”‚ ) โ”‚ โ”‚
โ”‚ โ”‚ ssl_context = None โ”‚ โ”‚
โ”‚ โ”‚ url = 'ws://localhost:8000/hello' โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/contextlib.py:199 in aenter โ”‚
โ”‚ โ”‚
โ”‚ 196 โ”‚ โ”‚ # they are only needed for recreation, which is not possible anymore โ”‚
โ”‚ 197 โ”‚ โ”‚ del self.args, self.kwds, self.func โ”‚
โ”‚ 198 โ”‚ โ”‚ try: โ”‚
โ”‚ โฑ 199 โ”‚ โ”‚ โ”‚ return await anext(self.gen) โ”‚
โ”‚ 200 โ”‚ โ”‚ except StopAsyncIteration: โ”‚
โ”‚ 201 โ”‚ โ”‚ โ”‚ raise RuntimeError("generator didn't yield") from None โ”‚
โ”‚ 202 โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ self = <contextlib._AsyncGeneratorContextManager object at 0x105ddc8b0> โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ”‚ โ”‚
โ”‚ /Users/sangshuduo/anaconda3/lib/python3.10/site-packages/trio_websocket/_impl.py:128 in โ”‚
โ”‚ open_websocket โ”‚
โ”‚ โ”‚
โ”‚ 125 โ”‚ โ”‚ except trio.TooSlowError: โ”‚
โ”‚ 126 โ”‚ โ”‚ โ”‚ raise ConnectionTimeout from None โ”‚
โ”‚ 127 โ”‚ โ”‚ except OSError as e: โ”‚
โ”‚ โฑ 128 โ”‚ โ”‚ โ”‚ raise HandshakeError from e โ”‚
โ”‚ 129 โ”‚ โ”‚ try: โ”‚
โ”‚ 130 โ”‚ โ”‚ โ”‚ yield connection โ”‚
โ”‚ 131 โ”‚ โ”‚ finally: โ”‚
โ”‚ โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚
โ”‚ โ”‚ connect_timeout = 5.0 โ”‚ โ”‚
โ”‚ โ”‚ disconnect_timeout = 5.0 โ”‚ โ”‚
โ”‚ โ”‚ extra_headers = None โ”‚ โ”‚
โ”‚ โ”‚ host = 'localhost' โ”‚ โ”‚
โ”‚ โ”‚ max_message_size = 1048576 โ”‚ โ”‚
โ”‚ โ”‚ message_queue_size = 1 โ”‚ โ”‚
โ”‚ โ”‚ new_nursery = <trio.Nursery object at 0x105ddcbb0> โ”‚ โ”‚
โ”‚ โ”‚ port = 8000 โ”‚ โ”‚
โ”‚ โ”‚ resource = '/hello' โ”‚ โ”‚
โ”‚ โ”‚ subprotocols = None โ”‚ โ”‚
โ”‚ โ”‚ use_ssl = False โ”‚ โ”‚
โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
HandshakeError`

Create binaries for different distributions

My goal is to be able to distribute ws to different OS with a native binary like httpie does.
I'm aware of pyinstaller but man, this thing is not trivial ๐Ÿ˜†

I did some quick tests on my Ubuntu 20.04.4 LTS but I realized that my python installation using pyenv is missing some binaries crucial for pyinstaller to work.
I also tried on my Windows 10 laptop and the binary is not working and I have no clue of what is happening.

I don't think I have time / motivation for this feature, so any help would be greatly appreciated.

Completion support for commands and options in PowerShell and PowerCore

Issues

Like the title said, I want to implement completion capabilities on ws. I started PR #6 for this purpose. Unfortunately
when trying on my Windows 10 laptop, I have two / three problems:

  • First, for an unknown reason, when spawning a virtualenv with poetry (my package manager)
    shellingham detects the shell as cmd ๐Ÿคจ. I guess it is not really important
    since when I created a binary wheel and installed it locally, I don't have this issue anymore.
  • Second, and the real one, the command install-completion installed the completion script, but... nothing happens. ๐Ÿ˜ข
  • Also, not sure, it is really important, but it seems like calling install-completion again creates a weird error. Not
    sure if it is due to my configuration or the fact that I tried to manipulate my user profile to test different setups
    and also, in practice there is no need to call install-completion twice if it works correctly.

Alternatives

click-completion

There is a community package click-completion I used to use a few
years ago but seems a little outdated now.

typer

Typer is a great package based on click, but I found it (personal taste may be) not
convenient to extend it with community packages like those of click-contrib.

What's next?

It will be interesting if someone tests my PR on his laptop to see if autocompletion works correctly. Maybe it is just
my shell configuration which has an issue?
But if it does not work on someone else computer, I'll definitely need help because it is not a subject I master.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.