sanic command line to start the app, developer mode -dev model error
snail-developer opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I am using Sanic v23.12.1, and when I start the server on my mac, I use developer mode -dev error. The sanic server:app --dev error is IndexError: list assignment index out of range. However, I used sanic server:app --debug --reload to start.
Code snippet
from sanic import Sanic
from sanic.response import text
app = Sanic("NMTTranslateApp")
@app.get("/")
async def hello_world(request):
return text("Hello, world!")
Expected Behavior
No response
How do you run Sanic?
Sanic CLI
Operating System
MacOS
Sanic Version
v23.12.1
Additional context
No response
pip install httpx
works (for me) as a workaround until the check if httpx is available in cli/console.py is fixed. It tries to delete element 3 from a 3 element array (0..2)(variable_descriptions) before logging that httpx is not available.
Perhaps that's just an off by one and it should be
del variable_descriptions[2]
?
This should be resolved in the releases next week.