ok-oldking / ok-oldking/ok-script

UpdateCard 在 PYAPPIFY_VERSION=None 时应置灰而非抛 ERROR

Open Beginner friendly
#90 0 comments 0 reactions 0 assignees View on GitHub

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.pypython main_debug.py 在本地直接运行(非 pyappify.exe 启动器),此时 PYAPPIFY_VERSION 处于未注入状态(None

复现

步骤
  1. uv sync --group dev && uv run python main.py
  2. 等待 MainWindow._schedule_update_check 自动触发
    • ok/ui/qt/MainWindow.py:287-296 30s
    • update_check_delay_ms:72PYAPPIFY_PYTHON_TEST 时 10s
  3. 或手动打开 About > App update 点击 Check for updates
现象

后台 UpdateCard._run_in_background:142pyappify.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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.