Streamlit выдает ошибку TypeError: неправильный тип аргумента для встроенной операции, зачем использовать html из PgwalkPython

Программы на Python
Anonymous
Streamlit выдает ошибку TypeError: неправильный тип аргумента для встроенной операции, зачем использовать html из Pgwalk

Сообщение Anonymous »

У меня есть фрейм данных с именем data, и я хочу визуализировать его, используя:

Код: Выделить всё

        walker = pyg.walk(data, return_html=True)
st.components.v1.html(walker, width=1100, height=800)
pyg — это pygwalker, а st — это поток импорта, как st.
Но я получаю:

Код: Выделить всё

TypeError: bad argument type for built-in operation
Traceback:
File "C:\Users\trist\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 75, in exec_func_with_error_handling
result = func()
^^^^^^
File "C:\Users\trist\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 574, in code_to_exec
exec(code, module.__dict__)
File "C:\Users\trist\OneDrive\Desktop\GitHub\nfl-data-app\nfl_data.py", line 125, in 
st.components.v1.html(walker, width=1100, height=800)    #Adjust width and height as needed
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\trist\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\metrics_util.py", line 408, in wrapped_func
result = non_optional_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\trist\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\elements\iframe.py", line 129, in _html
marshall(
File "C:\Users\trist\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\elements\iframe.py", line 180, in marshall
proto.srcdoc = srcdoc

Код: Выделить всё

^^^^^^^^^^^^
Я ожидал, что мое приложение с потоковой подсветкой отобразит панель мониторинга. Это работает иначе.

Подробнее здесь: https://stackoverflow.com/questions/788 ... -why-using

Вернуться в «Python»