MarshallComponentException: Argument xyz needs a label

I have followed the tutorial for custom components, built (with npm run build) my component and it now lives in the /home/derek/streamlit/streamlit_custom_components/custom_components/frontend/build directory.

I have imported it in example.py (which lives in /home/derek/streamlit/streamlit_custom_components/custom_components) like so:

import streamlit as st
import os
from streamlit.components.v1 import components

parent_dir = os.path.dirname(os.path.abspath(__file__))
build_dir = os.path.join(parent_dir, "frontend/build")
component = components.declare_component("comp1", path=build_dir)

component('Potato', key='potato')

However I am hit with the nasty error of `MarshallComponentException: Argument ‘Potato’ needs a label.

What is this label that it needs? I am totally at a loss. Also who is Marshall?

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.