error using livereload with flask

Open
#270 3 comments 2 reactions 0 assignees View on GitHub

@nacho00112 is already working on this.

Since Jun 19, 2023.

  • #271 by @nacho00112 — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
flask, python
Domain
devtools

Research direction

Reproduce the error with the shown Flask application, livereload Server(app.wsgi_app), and a visit to 127.0.0.1:5500. Start by tracing the WSGIContainer.environ call involved in that request; done means the page loads without the missing-request TypeError.

Written by the indexing model from the issue text.

Description

from flask import Flask, render_template, request, redirect, url_for, session
from livereload import Server

app = Flask(
    __name__,
    static_url_path='/static',
    static_folder='static'
)

@app.route('/', methods=['GET', 'POST'])
def index():
    return ''

if __name__ == "__main__":
    app.debug = True
    server = Server(app.wsgi_app)
    server.watch('templates/*.*')
    server.serve()

this is my code, getting this error TypeError: WSGIContainer.environ() missing 1 required positional argument: 'request'
everytime i visit 127.0.0.1:5500?

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.