2

In the folder App, I have a file "app.py" with the below code (from https://docs.chainlit.io/get-started/pure-python):

import chainlit as cl
from chainlit import user_session
@cl.on_message
async def main(message: cl.Message):
 # Your custom logic goes here...
 # Send a response back to the user
 await cl.Message(
 content=f"Received: {message.content}",
 ).send()

I'm trying to run this file in a terminal (macos Sonoma, zsh) with command "chainlit -w run app.py" and I'm getting the below error:

jarkow@MacBook-Air-Jarkow-2 App % chainlit run app.py -w

Usage: chainlit run [OPTIONS] TARGET Try 'chainlit run --help' for help.

Error: Invalid value: File does not exist: chainlit_basics.py

I installed the chainlit python package successfully and the command "chainlit hello" works well.

Atul
4,5786 gold badges55 silver badges109 bronze badges
asked Nov 3, 2023 at 18:47
2
  • 5
    Try python -m chainlit run app.py Commented Nov 3, 2023 at 19:06
  • In my case, I had to use python3 ... Commented Apr 16 at 14:43

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.