我试图将我的session_id保存在get_report_ctx()中的一个变量中,但是我得到了以下错误:
AttributeError: 'NoneType' object has no attribute 'session_id'这些是我使用的streamlit库和返回上述错误的命令:
import streamlit as st
from streamlit.report_thread import get_report_ctx
from streamlit.server.server import Server
import streamlit.legacy_caching.hashing
SESSION_ID = get_report_ctx().session_id我的流光版本是1.3.1。任何帮助都将不胜感激。
发布于 2022-01-17 17:01:37
尝试:
import streamlit.ReportThread as ReportThread而不是:
from streamlit.report_thread import get_report_ctx和
SESSION_ID = ReportThread.get_report_ctx().session_idhttps://stackoverflow.com/questions/70744798
复制相似问题