question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

connect_error reason

See original GitHub issue
@sio.event
def connect_error():
    print("The connection failed!")

Is there a way to see what caused the connection to fail? I was looking at this issue which accepts the message parameter, but on the latest version this does not seem to work.

https://github.com/miguelgrinberg/python-socketio/issues/344#issuecomment-557880894

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
miguelgrinbergcommented, Jun 19, 2020

Best way to handle the two error cases is to set a default value for your message argument.

@sio.event
def connect_error(message=None):
    print("The connection failed! ", message )
0reactions
mcg88commented, Jun 19, 2020

No, its a third party server so no access there. The situation I noticed it was where it was connected for a period of time. When my app errored out in the stack trace I saw a connection refused error

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exceptions - HTTPX
An error occurred while interacting with the network. class httpx.ConnectError (message, *, request=None).
Read more >
Localhost Refused to Connect Error: 5 Confirmed Ways to Fix It
Localhost refused to connect error can be caused by an incorrectly configured port, insufficient permissions, or an inoperative web server.
Read more >
httpx.ConnectError: All connection attempts failed #2275
So, it couldn't connect. Although the error messaging obviously isn't very helpful for you in determining why. Take things step by step. First,...
Read more >
Connect error: Error Domain=NSPOSIXErrorDomain Code=49 ...
Our user use App and receive some error code "Error Domain=NSPOSIXErrorDomain Code=49 "Can't assign requested address"",. I have search our monitor, ...
Read more >
Errors - Connect.build
All errors are represented by ConnectError , a subtype of the built-in Error ... Connect-Web converts those errors into a ConnectError with code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found