MCPcopy Index your code
hub / github.com/python-websockets/websockets / InvalidState

Class InvalidState

src/websockets/exceptions.py:435–447  ·  view source on GitHub ↗

Raised when sending a frame is forbidden in the current state. Specifically, the Sans-I/O layer raises this exception when: * sending a data frame to a connection in a state other :attr:`~websockets.protocol.State.OPEN`; * sending a control frame to a connection in a state o

Source from the content-addressed store, hash-verified

433
434
435class InvalidState(WebSocketException, AssertionError):
436 """
437 Raised when sending a frame is forbidden in the current state.
438
439 Specifically, the Sans-I/O layer raises this exception when:
440
441 * sending a data frame to a connection in a state other
442 :attr:`~websockets.protocol.State.OPEN`;
443 * sending a control frame to a connection in a state other than
444 :attr:`~websockets.protocol.State.OPEN` or
445 :attr:`~websockets.protocol.State.CLOSING`.
446
447 """
448
449
450class ConcurrencyError(WebSocketException, RuntimeError):

Callers 9

send_continuationMethod · 0.85
send_textMethod · 0.85
send_binaryMethod · 0.85
send_closeMethod · 0.85
send_pingMethod · 0.85
send_pongMethod · 0.85
ensure_openMethod · 0.85
write_frameMethod · 0.85
test_strMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_strMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…