ok-oldking / ok-oldking/ok-script
UpdateCard 在 PYAPPIFY_VERSION=None 时应置灰而非抛 ERROR
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 739
- Forks
- 208
- Avg merge
- 7h 47m
- Merged PRs (30d)
- 1
Description
环境
- 库版本:
ok-script==2.0.4,pyappify==1.0.13 - 运行方式:使用
uv run python main.py或python main_debug.py在本地直接运行(非pyappify.exe启动器),此时PYAPPIFY_VERSION处于未注入状态(None)
复现
步骤
uv sync --group dev && uv run python main.py- 等待
MainWindow._schedule_update_check自动触发ok/ui/qt/MainWindow.py:287-29630supdate_check_delay_ms:72在PYAPPIFY_PYTHON_TEST时 10s
- 或手动打开
About > App update点击Check for updates
现象
后台 UpdateCard._run_in_background:142 调 pyappify.get_version_list(release_only=True) → pyappify/__init__.py:415-418 抛出错误:
RuntimeError: PyAppify does not support checking for updates for pyappify_version: None
被 UpdateCard.py:167-171 捕获后以 ERROR 记录日志,形如:
2026-08-30 xx:xx:xx ERROR UpdateCard:pyappify.get_version_list failed:
...
Traceback File "...UpdateCard.py" line 167
期望
本地开发模式应保留卡片但按钮置灰、提示“本地开发模式不支持检查”,不产生 ERROR,不自动调度。打包器保持现有流程。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run uv sync --group dev && uv run python main.py and inspect ok/ui/qt/MainWindow.py:287-296 together with UpdateCard.py:142 and 167-171. Verify the local-development path handles PYAPPIFY_VERSION=None without an ERROR, leaves the card visible with its button disabled and the stated message, and does not schedule automatic checks while preserving the packaged flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100