You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Streamlit IFC.js Viewer组件加载失败求助

问题:Streamlit IFC可视化组件加载失败

我跟着教程创建Streamlit IFC数据应用,但IFC可视化组件一直加载失败,不管是按步骤手动操作还是直接克隆仓库都不行,换了两台配置类似的Windows 11笔记本、Chrome和Brave浏览器都没解决。

错误信息

Your app is having trouble loading the _🎮_Viewer.ifc_js_viewer component.

(The app is attempting to load the component from ****, and hasn't received its "streamlit" message.)

If this is a development build, have you started the dev server?
If this is a release build, have you compiled the frontend?
For more troubleshooting help, please see the Streamlit Component docs or visit our forums.

环境信息

  • Streamlit版本:1.28.2
  • Python版本:3.10.13(Anaconda 3)
  • ifcopenshell版本:0.7.0.231127
  • 系统:Windows 11

排查与解决建议

  1. 确保组件前端编译完成
    如果是克隆仓库运行,进入组件目录(如Viewer文件夹),执行前端依赖安装与编译:

    npm install
    npm run build
    

    完成后回到项目根目录重新启动Streamlit应用。

  2. 验证组件依赖安装
    确认streamlit-ifc-viewer或教程指定的组件包已正确安装,执行:

    pip install streamlit-ifc-viewer
    
  3. 降级Streamlit版本
    新版本Streamlit可能与组件存在兼容性问题,尝试降级到1.25.x版本:

    pip install streamlit==1.25.0
    

    重启应用测试。

  4. 排查网络与系统限制
    暂时关闭Windows防火墙、代理工具,或者将Streamlit加入系统安全白名单,避免前端资源被拦截。

  5. 创建干净虚拟环境测试
    用Anaconda新建独立环境,仅安装必要依赖排除环境干扰:

    conda create -n ifc-app python=3.10
    conda activate ifc-app
    pip install streamlit ifcopenshell streamlit-ifc-viewer
    

    克隆仓库到该环境后运行应用。

内容的提问来源于stack exchange,提问作者Tommer Rissin

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.05 06:32:37