Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Hot reload not working when app.py has +x permissions #406

Copy link
Copy link
@Dustella

Description

@Dustella
Issue body actions

Hot reload not working when app.py has +x permissions.

To replicate, create app.py like this, run it in debug mode

from quart import Quart

app = Quart(__name__)


@app.route("/api")
async def json():
    return {"hello": "world"}

if __name__ == "__main__":
    app.run(debug=True)

and give this file +x permissions on Linux

chmod +x app.py

use python app.py to run the code. Saving the file will cause an error like this:

[2025-02-11 13:31:59 +0800] [10620] [INFO] Running on http://127.0.0.1:5000 (CTRL + C to quit)
Traceback (most recent call last):
  File "/home/user/Code/quart_example/./app.py", line 11, in <module>
    app.run(debug=True)
  File "/home/user/miniconda3/lib/python3.11/site-packages/quart/app.py", line 890, in run
    restart()
  File "/home/user/miniconda3/lib/python3.11/site-packages/quart/utils.py", line 170, in restart
    os.execv(executable, [executable] + args)
OSError: [Errno 8] Exec format error

But by running the code using quart run, hot reload will work fine.

Environment:

  • Python version: Python 3.11.11 (main, Dec 11 2024, 16:28:39) [GCC 11.2.0] on linux
  • Quart version: Quart 0.20.0
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.