Streamlit throwing TypeError: bad argument type for built-in operation why using html from Pgwalker.walk

  Kiến thức lập trình

I have a dataframe named data and I want to visualize it using:

        walker = pyg.walk(data, return_html=True)
        st.components.v1.html(walker, width=1100, height=800) 

pyg is pygwalker and st is import streamlit as st

But I get:

TypeError: bad argument type for built-in operation
Traceback:
File "C:UserstristAppDataLocalProgramsPythonPython311Libsite-packagesstreamlitruntimescriptrunnerexec_code.py", line 75, in exec_func_with_error_handling
    result = func()
             ^^^^^^
File "C:UserstristAppDataLocalProgramsPythonPython311Libsite-packagesstreamlitruntimescriptrunnerscript_runner.py", line 574, in code_to_exec
    exec(code, module.__dict__)
File "C:UserstristOneDriveDesktopGitHubnfl-data-appnfl_data.py", line 125, in <module>
    st.components.v1.html(walker, width=1100, height=800)    #Adjust width and height as needed
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:UserstristAppDataLocalProgramsPythonPython311Libsite-packagesstreamlitruntimemetrics_util.py", line 408, in wrapped_func
    result = non_optional_func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:UserstristAppDataLocalProgramsPythonPython311Libsite-packagesstreamlitelementsiframe.py", line 129, in _html
    marshall(
File "C:UserstristAppDataLocalProgramsPythonPython311Libsite-packagesstreamlitelementsiframe.py", line 180, in marshall
    proto.srcdoc = srcdoc
^^^^^^^^^^^^

I was expecting my streamlit app to display the dashboard. It works otherwise.

New contributor

Tristram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT