[Python] AttributeError: module 'streamlit' has no attribute '_is_running_with_streamlit'....

Discussão em 'Python' iniciado por Stack, Janeiro 15, 2025.

  1. Stack

    Stack Membro Participativo

    from streamlit.web import cli as stcli
    import sys

    if __name__ == '__main__':
    if st._is_running_with_streamlit:
    main()
    else:
    sys.argv = ["streamlit", "run", sys.argv[0]]
    sys.exit(stcli.main())


    Above codes used to work without having any problem but now it doesn't work anymore when I upgrade my streamlit to version 1.14.0.

    It will show the below problem when I try to run my program in the PyCharm IDE!

    Traceback (most recent call last):
    File "C:\Users\juroy\PycharmProjects\TikTokAnalytics\app.py", line 66, in <module>
    if st._is_running_with_streamlit:
    AttributeError: module 'streamlit' has no attribute '_is_running_with_streamlit'


    What is the latest update for this?

    Continue reading...

Compartilhe esta Página