Hello! I am attempting to get a streamlit app deployed to the community cloud. Here is the repo. I receive the following error: ModuleNotFoundError: No module named 'life4'. This makes sense - in the src layout, I need to install the current project (uv pip install -e .) so that the paths can resolve.
Is there a way I can tell streamlit to do the same? Or perhaps I need to modify my pyproject.toml? Worst case, I can modify sys.path or edit my project layout, but I’d prefer not to.
Hmm, its definitely not in the structure of the imports… I was able to get it to return some test functions that I added to the ddr and a20 libraries
I am running streamlit run app.py from the top level domain
Do you think perhaps the error came from streamlit community cloud not being able to access the module but maybe from the a20 and ddr libraries not being able to access each other?
That might be the case if you are able to get it to work on your laptop in edit mode but I think in an external production setting the __init__.py files need to be bulletproof
So sorry @444B ! I modified the code after posting. I edited sys.path to add src to the python path (see top of: app.py). After doing so, all of the life4 imports are able to work successfully, and the app was able to deploy. I thought there might be a “better” solution, but given this is only a one-liner, I’m content with it for now.
Ah no worries and good luck with your training / competition! I had no idea that DDR had such a vibrant and competitive supporting ecosystem. I guess you learn something new every day
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.