Iβm attempting to deploy an app for the first time. It uses poetry for package management, and is hosted on a public GitHub repo. I have my account connected (when deploying, it is able to give me a list of repositories, as well as find the main/master branch).
However, when I deploy it, it fails with:
[13:18:43] π Starting up repository: 'cart-constructor', branch: 'main', main module: 'streamlit_app.py'
[13:18:43] π Cloning repository...
[13:18:44] π Cloning into '/app/cart-constructor'...
[13:18:44] π Failed to download the sources for repository: 'cart-constructor', branch: 'main', main module: 'streamlit_app.py'
[13:18:44] π Make sure the repository and the branch exist and you have write access to it, and then reboot the app.
[13:20:23] βοΈ Streamlit server consistently failed status checks
[13:20:23] βοΈ Please fix the errors, push an update to the git repo, or reboot the app.
I am completely lost as to why.
I am able to http-clone the repo locally. I have deleted and schedule the deployment of the app multiple times - but without success.
Why is the installer expecting that /app/cart-constructor/cart-constructor exists? I donβt speak poetry, but I suspect there is something wrong in your pyproject.toml.
Alright, solved. It seems that streamlit either doesnβt seem to support poetry yet, or thereβs a bug somewhere. I couldnβt even deploy a freshly generated hello-world type project. For anyone else struggling:
Wait a bit, and do the Reboot app action on Streamlit deployment site.
@Goyo, There was one thing incorrect in my poetry file after all, but it ended up being insignificant. I was overzealous in renaming my project, and in fact thereβs a line that should read: packages = [{ include = "cart_constructor" }]
instead of packages = [{ include = "cart-constructor" }] - it looks for a package with an underscore.
From the looks of the error before, Streamlit it looking for something in /app/<proj-or-repo-name>/<included_package>. In this case, itβs how Streamlit works - not poetry, that causes the issue to appear. Poetry handles dependency management, automatically generates you a virtual environment, but when it comes to running the modules, you can just activate it and do python something.py and thatβs it. Iβve never seen it throw any errors past this point, that running python normally wouldnβt.
In terms of the pyproject.toml structure, I tested with the default-generated one in a blank hello-world type project, and I still couldnβt get it to deploy. It would get stuck on β Spinning up manager process.... I tested with and without poetry.lock. That is, until I included requirements.txt and rebooted the deploying app. The pyproject.toml had the same structure as the one in my original question. (only different project / package name & dependencies)
@Franky1, thanks for the help - seeing if removing poetry.lock helps was a good shout - it does prevent the error during dependency installation (though I still couldnβt get the deployment to finish). Although ultimately it wouldnβt be a good solution since poetry.lock is meant to be kept in the repo.
Anyway, thanks everyone for the help - the issue is solved.
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.