-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navigation bar is not loaded #4
Comments
Hi @bhstraume, thanks for opening the bug report! I'll take a look at this as soon as possible. |
@bhstraume I followed your steps to reproduce the problem:
Using the same system versions:
But the navbar worked fine for me. We will have to try different approaches and gather more info, if you don't mind. In a new and empty directory, without cloning the repo, try to create a new environment again, activate it and install just the navbar (Streamlit will be installed automatically):
Next, run this command in the same terminal: streamlit-navigation-bar If the package is properly installed, it should output this message: Streamlit Navigation Bar, version 3.1.2 If this worked so far, create a import streamlit as st
from streamlit_navigation_bar import st_navbar
page = st_navbar(["Home", "Documentation", "Examples", "Community", "About"])
st.write(page) And run it: streamlit run streamlit_app.py Then, let me know if the problem persists or not. Besides that, what version of Chrome are you using? You can find it by following this guide. |
@gabrieltempass Thanks for looking into this. I've followed your new approach precisely. When running this in the same terminal in Visual Code: But unfortunately the issue persists after creating the new py file with the basic example and running it. I've tried these browsers, with the same behavior in all of them: |
Did another try now where I uninstalled everything Python related completely, and then downloaded and installed the latest version 3.12.3. But still no success. The same yellow warnings about the troubles loading the components appear. |
From what you described, one of the reasons that could be causing the component to not load is because the app is somehow not importing the files from the navbar installation. When you clone the repo, and run the example app, the statement: from streamlit_navigation_bar import st_navbar could be trying to import the function from the But you mentioned that after running my suggested approach you still face the same issue, so maybe that's not what's going on. You also said that when you clone the repo and run:
you are able to visualize the navbar. Thus, as a workaround, I would suggest to keep doing this. Although I would replace the
And change the I'm sorry this is the best answer I can give you right now. Since I can't reproduce the error, it's hard to find out what's causing it. But I will leave the issue open and keep trying to debug it. |
I am having similar issue as well where I keep getting ModuleNotFoundError: No module named 'streamlit_navigation_bar' Eventhough it's installed |
Checklist
Summary
After cloning the repo, creating a venv and installing the requirements, none of the examples run.
The navigation bar is not able to be rendered.
Reproducible code example
No response
Steps to reproduce
Open Bash, and run
git clone https://github.com/gabrieltempass/streamlit-navigation-bar.git
In Visual Code, open the streamlit-navigation-bar folder
Start a Terminal session and run the following commands
python -m venv venv
. .\venv\Scripts\activate
pip install -r requirements.txt
streamlit run .\examples\st_navbar_1\streamlit_app.py
Expected behavior
Be able to test the different examples.
Current behavior
Not able to run the navigation bar at all.
Is this a regression?
Debug info
libraries.txt
Additional information
Instead of cloning the repo, I have tried to create a new venv, installing the requirements streamlit-navigation-bar and streamlit, and then run the basic example as explained here: https://github.com/gabrieltempass/streamlit-navigation-bar
Same error occur.
But I have been able to run the navigation bar after running the frontend component:
cd streamlit_navigation_bar/frontend
npm install
npm run dev
The text was updated successfully, but these errors were encountered: