when i run streamlit file demo1.py, but the browser gives me wrong content running, it feels like my demo2.py’s content.
demo1.py code shows as following:
i feel very confused, why i run demo1, but the first line code didn’t work, such as st.write('method1') didn’t show up. please anyone can tell me what happened?
may I ask how you organized your folders? streamlit support multi - pages, so if you put everything in root folder and not using correct command of `streamlit run demo1.py’ , it could cause problems as you described.
Translated to chn
你文件夹怎么组织的, streamlit 支持多页面的, 根目录应该放你的demo1.py, 然后新建文件夹命名为"pages" 存放其他页面
Thanks for your answer, i found that in my demo1.py quote another file mapping.py, and the browser shows content is the mapping.py’s code, so i guess the reason is quoting mapping.py. so i tried to delete quoting mapping.py file, and it solved. Thank you so much.
Thanks for your answer, i found that in my demo1.py quote another file mapping.py, and the browser shows content is the mapping.py’s code, so i guess the reason is quoting mapping.py. so i tried to delete quoting mapping.py file, and it solved. Thank you so much.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.