Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sanic command line to start the app, developer mode -dev model error #2943

Open
1 task done
snail-developer opened this issue Apr 29, 2024 · 1 comment
Open
1 task done
Labels

Comments

@snail-developer
Copy link

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

@toasta
Copy link

toasta commented May 2, 2024

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]?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants