tornado.websocket.WebSocketClosedError

Open
#251 4 comments 1 reaction 0 assignees View on GitHub

@jihtsan is already working on this.

Since Oct 28, 2026.

  • #299 by @jihtsan — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
flask, python
Domain
backend

Research direction

Start with main.py and the Server.serve call, then inspect the reported traceback location in tornado/websocket.py at line 1104 and the surrounding reload behavior. Reproduce the error while changing code pages and determine what outcome should replace the unhandled WebSocketClosedError.

Written by the indexing model from the issue text.

Description

When I change something in code pages, I get following error 👍

Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/cafe_app19-P_30WATA/lib/python3.8/site-packages/tornado/websocket.py", line 1104, in wrapper
    raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError

I run my flask web app with :

sudo pipenv run python3 main.py

and my code for the server start is :

if __name__ == "__main__":
	# for hot reload during development, debug must be True.
	app.debug = True
	# Reload webpages on changes, without hitting refresh in your browser.
	server = Server(app.wsgi_app)
	server.serve(port=5000, host='localhost')
Dominant language
Python
Stars
1.1k
Forks
149
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lepture/python-livereload

All issues in lepture/python-livereload

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.