I am trying to run the example code located in Shiny's "Learn Shiny" resource (User interfaces – Shiny for Python) (pasted below). I am encountering an error: "The 'comm' trait of a FigureWidget instance expected a Comm or None, not the OrphanedShinyComm OrphanedShinyComm(comm_id='abunchofletters').
I've tried updating all packages, explictly setting comm=none, disconnected from VPN cuz sometimes that's the magic, I tried asking AI and it had me trying to explicitly declare the histogram as a figure first...none of these things are working. And searching here and the great internet beyond, I am not seeing much at all in terms of similar errors.
Any geniuses out there that can help me get over this roadblock? Thanks in advance!
from shiny.express import input, render, ui
from shinywidgets import render_plotly
ui.page_opts(title="Penguins dashboard", fillable=True)
with ui.sidebar():
ui.input_selectize(
"var", "Select variable",
["bill_length_mm", "bill_depth_mm", "flipper_length_mm", "body_mass_g", "year"]
)
ui.input_numeric("bins", "Number of bins", 30)
with ui.card(full_screen=True):
@render_plotly
def hist():
import plotly.express as px
from palmerpenguins import load_penguins
return px.histogram(load_penguins(), x=input.var(), nbins=input.bins())