Hello, sorry for this question, it can seem stupid, but I can’t deploy my app. I created repository on GitHub
I have here all my files and I have no idea how should I connect it with my app. Still get message like
‘Could not find a remote repository hosted on GitHub. Are you sure you are on a branch that is tracking a remote GitHub branch?’
Could u explain me step by step how can I solve this problem? Thanks.
Ok i Solved it, now i have some errors like this:
File “/app/bobrza/bobrza.py”, line 14, in
bobrza_locations = pd.read_csv(location)
How can I set a path to file in github repository? Locally everything works
Also tried with different paths like location=open(“path”) etc…
Hi @Bordonous, welcome to the Streamlit community! It’s not stupid, everyone starts somewhere
The important thing to realize about deploying an app somewhere other than the computer you developed it on is that it’s unlikely that the file paths will be the same. For example, if you use windows and pass a path like H:/folder/streamlit, it’s unlikely the next machine will have the H: drive mapped and to the same exact location you intend.
So in this case, this line and others like it will fail, both because it’s a different machine and Streamlit Cloud uses linux containers:
The way to handle this is to use a relative file reference. Here is an article that talks about file paths in Python and how to do various common operations:
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.