Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

v2.10.1: fails to start on Python 3.14

已關閉 適合新手
#147 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
76/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
python
領域
backend

研究方向

從報告中指出的 src/e3sm_quickview/view_manager.py 中的 asyncio.get_event_loop() 呼叫處開始,接著檢查伺服器如何啟動,以及 wslink 如何處理事件迴圈設定。使用報告中的啟動命令在 Python 3.14 上重現問題;當 quickview 啟動時不再出現缺少事件迴圈的錯誤,即為完成。考慮依照建議將 Python 3.14 加入 CI。

由索引模型根據 Issue 內容生成。

描述

We're testing e3sm-quickview 2.10.1 (from conda-forge) on Perlmutter, in the upcoming E3SM-Unified 1.14.0, which uses Python 3.14.7. Running quickview crashes on startup, before the server starts:

$ quickview
VTKStreaming Video encoding is NOT AVAILABLE (missing Python package)
Loading plugin :  .../e3sm_quickview/plugins/eam_gridlines.py
Loading plugin :  .../e3sm_quickview/plugins/eam_projection.py
Loading plugin :  .../e3sm_quickview/plugins/eam_reader.py
Loading plugin :  .../e3sm_quickview/plugins/eam_filters.py
Traceback (most recent call last):
  File ".../bin/quickview", line 10, in <module>
    sys.exit(main())
             ~~~~^^
  File ".../e3sm_quickview/app.py", line 802, in main
    app = EAMApp()
  File ".../e3sm_quickview/app.py", line 75, in __init__
    self.view_manager = ViewManager(self.server, self.source)
                        ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../e3sm_quickview/view_manager.py", line 100, in __init__
    self.loop = asyncio.get_event_loop()
                ~~~~~~~~~~~~~~~~~~~~~~^^
  File ".../python3.14/asyncio/events.py", line 718, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
                       % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'MainThread'.

Cause: Starting with Python 3.14, asyncio.get_event_loop() raises RuntimeError when no loop is set, where earlier versions created one implicitly. ViewManager.__init__ (view_manager.py#L100) runs before trame/wslink have started a loop, so it fails. The same line is still on main.

Suggested fix: wslink 2.5.7 already handles this (wslink/core.py, wslink/server.py) with:

try:
    self.loop = asyncio.get_event_loop()
except RuntimeError:
    self.loop = asyncio.new_event_loop()
    asyncio.set_event_loop(self.loop)

wslink then picks up the same loop when the server starts. We checked this by setting a loop before calling main():

python -c "import asyncio, sys; asyncio.set_event_loop(asyncio.new_event_loop()); from e3sm_quickview.app import main; sys.argv[0]='quickview'; sys.exit(main())" --server

With that, the server starts normally and prints the connection URL. Since requires-python = ">=3.10" allows 3.14, it may also be worth adding Python 3.14 to CI.

This looks related to #111 (event loop missing in debounce) but affects a different code path.

Environment:

  • e3sm-quickview 2.10.1 (conda-forge, noarch)
  • Python 3.14.7
  • trame 4.0.0, trame-server 4.0.0, wslink 2.5.7
  • NERSC Perlmutter login node (pm-cpu)

Drafted by Claude Code and @xylar together.

主要語言
JavaScript
星號
3
分支
4
平均合併
10 小時 10 分鐘
30 天內合併 PR
7

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Kitware/QuickView 的其他 Issue

查看 Kitware/QuickView 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。