Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message if server is not running #37

Closed
wenchengxucool opened this issue May 31, 2021 · 4 comments · Fixed by #57
Closed

Improve error message if server is not running #37

wenchengxucool opened this issue May 31, 2021 · 4 comments · Fixed by #57

Comments

@wenchengxucool
Copy link

Traceback (most recent call last):
File "/Users/david/.local/bin/termpair", line 8, in
sys.exit(main())
File "/Users/david/.local/pipx/venvs/termpair/lib/python3.9/site-packages/termpair/main.py", line 109, in main
asyncio.get_event_loop().run_until_complete(
File "/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/Users/david/.local/pipx/venvs/termpair/lib/python3.9/site-packages/termpair/share.py", line 231, in broadcast_terminal
async with websockets.connect(ws_endpoint, ssl=ssl_context) as ws:
File "/Users/david/.local/pipx/venvs/termpair/lib/python3.9/site-packages/websockets/client.py", line 517, in aenter
return await self
File "/Users/david/.local/pipx/venvs/termpair/lib/python3.9/site-packages/websockets/client.py", line 535, in await_impl
transport, protocol = await self._create_connection()
File "/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 1064, in create_connection
raise OSError('Multiple exceptions: {}'.format(
OSError: Multiple exceptions: [Errno 61] Connect call failed ('::1', 8000, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 8000)

@cs01
Copy link
Owner

cs01 commented May 31, 2021

Could you also share the commands you used that resulted in this error so that it can be reproduced?

@wenchengxucool
Copy link
Author

Could you also share the commands you used that resulted in this error so that it can be reproduced?

just use "termpair share -a"

@cs01
Copy link
Owner

cs01 commented Jun 1, 2021

Are you running the server on port 8000?

@cs01
Copy link
Owner

cs01 commented Jun 3, 2021

I think what is going on here is the client is trying to connect to a server that wasn't started. I updated the title of the issue to improve the error message.

Try running the server termpair serve --port 8000 then connecting the client termpair share --port 8000.

@cs01 cs01 changed the title OSError: Multiple exceptions: [Errno 61] Connect call failed ('::1', 8000, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 8000) Improve error message if server is not running Jun 3, 2021
@cs01 cs01 closed this as completed in #57 Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants