RetellAI / retell-custom-llm-python-demo

MIT License
57 stars 44 forks source link

ModuleNotFoundError: No module named 'twilio' #12

Closed nischalj10 closed 7 months ago

nischalj10 commented 7 months ago

I am on Python 3.11.8. I installed the dependencies using pip3 install -r requirements.txt and started ngrok. However, I kept on getting the error when I tried starting the server with uvicorn app.server:app --reload --port=8080

from twilio.twiml.voice_response import VoiceResponse
ModuleNotFoundError: No module named 'twilio'

I created a new python env and reinstalled everything but it still did not work. I tried replicating the issue in github codespaces and the issue there was uvicorn not found

nischalj10 commented 7 months ago

Finally figured out a hacky solution and I don't know why it works but use python3 -m uvicorn app.server:app --reload --port=8080 to start the server and these module not found errors won't occur

ctxadm commented 1 month ago

strange, ill got the error:

←[31mERROR←[0m: Error loading ASGI app. Could not import module "main". ←[32mINFO←[0m: Stopping reloader process [←[36m←[1m4512←[0m]

and your solution:

python3 -m uvicorn app.server:app --reload --port=8080

worked for that :D