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.

process stop after any exception with developing with reload feature

See original GitHub issue

Checklist

  • The bug is reproducible against the latest release or master.
  • There are no similar issues or pull requests to fix it yet.

Describe the bug

In 0.15, with --reload, If I edit my source file with any exception on startup (most commnly a SynataxError triggered by auto save function or some typo), the uvicorn process will wait for next file change and then try to reload it again.

But after I upgrade it to 0.16, the process will exit. Then I’ll have to start uvicorn again.

Steps to reproduce the bug

Install uvicorn==0.16.0

write any working asgi app

start it with reload flag uvicorn server:app --reload

edit your server.py with any change with it raise a error when startup

then the uvicorn process exited

Expected behavior

uvicorn process wait for reload like old behavior

Actual behavior

uvicorn process exited

Debugging material

No response

Environment

python3.8 windows

uvicorn.exe pol.server:app --reload --port 3000

Additional context

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
trim21commented, Dec 18, 2021

watchgod support executing a function after any fs event.

Add a new flag like --dev and add a thin wrapper to dispatch other flag like uvloop and port to uvicorn.run

0reactions
Kludexcommented, Jan 14, 2022

Yes. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

19. Beyond Exception Handling: Conditions and Restarts
FIND-RESTART looks for a restart with a given name and returns an object representing the restart if the restart is found and NIL...
Read more >
Make node.js not exit on error - Stack Overflow
An undefined exception places your application in an undefined state, the only good way to "resolve" this is to restart it. The role...
Read more >
Top 10 Selenium Exceptions and How To Handle These ...
Handling Exceptions in Selenium WebDriver - In this tutorial we will ... a method is called after quitting the browser by WebDriver.quit().
Read more >
Uncaught Exceptions in Node.js - George Ornbo
Dealing with uncaught exceptions in Node.js is not straightforward.
Read more >
Error monitoring and exception handling in large-scale ...
Learn how to handle errors and exceptions on large scale software ... to dream up every possible exception in your application and develop...
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