-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Seems that somehow termpair share defaults to port 80 somehow
Window 1
$ pipx run termpair serve
INFO: Started server process [218]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://localhost:8000 (Press CTRL+C to quit)
Window 2
$ pipx run termpair share -b
Traceback (most recent call last):
File "/home/mark/.local/pipx/.cache/b0d871b0f692059/bin/termpair", line 8, in
sys.exit(main())
File "/home/mark/.local/pipx/.cache/b0d871b0f692059/lib/python3.8/site-packages/termpair/main.py", line 109, in main
asyncio.get_event_loop().run_until_complete(
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/mark/.local/pipx/.cache/b0d871b0f692059/lib/python3.8/site-packages/termpair/share.py", line 231, in broadcast_terminal
async with websockets.connect(ws_endpoint, ssl=ssl_context) as ws:
File "/home/mark/.local/pipx/.cache/b0d871b0f692059/lib/python3.8/site-packages/websockets/client.py", line 517, in aenter
return await self
File "/home/mark/.local/pipx/.cache/b0d871b0f692059/lib/python3.8/site-packages/websockets/client.py", line 535, in await_impl
transport, protocol = await self._create_connection()
File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
raise exceptions[0]
File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
sock = await self._connect_sock(
File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/lib/python3.8/asyncio/selector_events.py", line 494, in sock_connect
return await fut
File "/usr/lib/python3.8/asyncio/selector_events.py", line 526, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 80)
use -p 8000
for both commands fixes the issue, but it makes me wonder if this is a bug or -p
should be mandatory?
same issue after running pipx install termpair
(so it's not to do with using pipx run
)
$ pipx runpip termpair freeze
aiofiles==0.5.0
cffi==1.14.3
click==7.1.2
cryptography==3.1.1
fastapi==0.61.1
h11==0.11.0
pkg-resources==0.0.0
pycparser==2.20
pydantic==1.6.1
six==1.15.0
starlette==0.13.6
termpair==0.1.0.2
uvicorn==0.12.1
websockets==8.1