Код: Выделить всё
walker = pyg.walk(data, return_html=True)
st.components.v1.html(walker, width=1100, height=800)
Но я получаю:
Код: Выделить всё
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