You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a developer does not define their app so that a worker process can access it, they will receive a KeyError when Sanic tries to access it from the registry.
For example, that would happen if an app only was instantiated on the main process:
if__name__=="__main__":
app=Sanic(...)
app.run()
The solution to this is usually either to move the instantiation outside that block, or to use an AppLoader.
We should provide a better error message from within a worker process if an app cannot be found in a registry.
The text was updated successfully, but these errors were encountered:
If a developer does not define their app so that a worker process can access it, they will receive a
KeyError
when Sanic tries to access it from the registry.For example, that would happen if an app only was instantiated on the main process:
The solution to this is usually either to move the instantiation outside that block, or to use an
AppLoader
.We should provide a better error message from within a worker process if an app cannot be found in a registry.
The text was updated successfully, but these errors were encountered: