Not able to make streamlit work on AWS EC2 with Ubuntu 22

The sample app is deployed on AWS EC2 runnning Ubuntu 22.
There is no repo yet, I am running a sample file.
There is no error message. The application doesn’t seem to write to the log file as well.

python --version
Python 3.10.12

streamlit --version
Streamlit, version 1.29.0

Sample code 

# import the library
import streamlit as stl
from streamlit.logger import get_logger
from pathlib import Path
from loguru import logger

logname = "file_1.log"
logger.debug("This is a debug message")

logger = get_logger(__name__)'Hello world')

# add title to your app
logger.debug("This is a debug message")

stl.title("Geeks for Geeks")'Bye world')

logger.debug("After writing a debug message")

when I run the server I get the following 

streamlit run --server.headless=true
2024-01-09 13:25:51.674 Did not auto detect external IP.
Please go to for debugging hints.

  You can now view your Streamlit app in your browser.

  Network URL:

So it seems you’re using both loguru and streamlit logger in your code. It is generally good practice to use one logging system to avoid potential confusion or conflicts in logging behavior. Another thing to check is if the directory you’re writing logs to has the appropriate write permissions and that the path is correct.

Let me know if this helps.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.