0

I have the following file structure:

dashboard
└── streamlit_app.py
    └── site
        ├── __init__.py
        └── app.py
# streamlit_app.py
from site.app import start

if __name__ == '__main__':
  start()
# app.py
import streamlit as st
import database as db

def start():
    st.set_page_config(
        page_title='henos',
        page_icon='https://imgur.com/a/urHOoK3',
        initial_sidebar_state='collapsed',
    )

    st.text('This website is under development, please wait until complete')

but when i run streamlit_app.py i get this error: error

any help would be great

1
  • 1
    it seems that the imported site is from python standard library, but not the package. You can print site.__file__ to check this. Commented Feb 2, 2021 at 23:13

1 Answer 1

1

Python has a module called 'site' and it's automatically imported during initialization.

Please check this link out to know more.

site package in python

Solution for your issue

Please try to change the package name you made from 'site' to something else.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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.