-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Bug Report: KeyError in Trubrics Streamlit Application
Project
Trubrics Streamlit Integration
Issue Type
Bug
Severity
High
Reported On
2024-01-20
Description
The Trubrics Streamlit application is throwing a KeyError
when initializing the FeedbackCollector
with the project
parameter set to "default"
. This error persists even when trying with a newly created project in Trubrics.
Steps to Reproduce
- Install the Trubrics Streamlit library using
pip install "trubrics[streamlit]"
. - Set up a Trubrics account and obtain the necessary credentials.
- Initialize
FeedbackCollector
in a Streamlit app using the provided credentials and the project set to"default"
or a newly created project name. - Run the Streamlit application.
Expected Behavior
The FeedbackCollector
should initialize without errors, allowing the Streamlit application to collect feedback using the specified Trubrics project.
Actual Behavior
The application throws a KeyError
indicating that the project "default"
is not found, even though it's specified in the Trubrics account. The error message is:
KeyError: "Project 'default' not found. Please select one of []."
Environment
- Platform: Streamlit's cloud hosted service
- Python Version: 3.9
- Streamlit Version: [latest]
- Trubrics Streamlit Library Version: [latest]
Additional Information
- The error occurs in the
FeedbackCollector
initialization. - The issue persists even after creating a new project in Trubrics and waiting for a few minutes before retrying.
- The basic instructions provided in the Trubrics account are being followed.
Attached Logs
2024-01-20 20:10:29.629 Uncaught app exception
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
exec(code, module.__dict__)
File "/mount/src/french_learning/streamlit_app.py", line 17, in <module>
collector = FeedbackCollector(
File "/home/adminuser/venv/lib/python3.9/site-packages/trubrics/integrations/streamlit/collect.py", line 27, in __init__
super().__init__(
File "/home/adminuser/venv/lib/python3.9/site-packages/trubrics/platform/__init__.py", line 42, in __init__
raise KeyError(f"Project '{project}' not found. Please select one of {projects}.")
Suggested Next Steps
- Verify if there's an issue with the Trubrics Streamlit integration library regarding project recognition.
- Check if there is a discrepancy between the user's Trubrics account setup and what the library expects.
- Investigate the potential need for an update or patch in the Trubrics Streamlit library.
Metadata
Metadata
Assignees
Labels
No labels