How to feed var to pc.html #748
Unanswered
lionsheep0724
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on my audio-streaming web project, with pynecone. My use case is upload .wav file to server and stream it when I click play button.
My approach is feed state variable(uploaded audio file path) to audio html tag, to create play button. But pc.html cannot handle string variable from state, with errors at
pc.html(RootState.audio_html)
:expected type pynecone.var.Var[typing.Dict], got value {'__html': BaseVar(name='audio_html', type_=<class 'str'>, state='root_state', is_local=False, is_string=False)} of type <class 'dict'>.
Refer to State code below.
Beta Was this translation helpful? Give feedback.
All reactions