Job viewer shows "Printer error" for cups-waiting-for-job-completed
维护者通常 2 天内回复
评估
调研方向
阅读 statereason.py,尤其是 StateReason.get_level(),并追踪 jobviewer.py 如何在 JobViewer.update_status() 中使用原因级别。将指定的 CUPS 原因添加到信息分类中,然后检查作业等待完成时状态栏不再报告错误。该 issue 没有指定测试文件。
由索引模型根据 Issue 内容生成。
描述
Note: This issue was written by my clanker. While I try to verify its steps as much as possible, it might not be 100% correct.
Summary
At the end of each job sent to an IPP printer, the job viewer's status bar shows "Printer error", even though the job prints and completes successfully.
Cause
- After sending the document, the CUPS
ippbackend sets the printer-state-reasoncups-waiting-for-job-completedwhile it waits for the printer to finish (cupsbackend/ipp.c). CUPS clears it infinalize_jobonce the job is done. StateReason.get_level()classifies every reason without a-reportor-warningsuffix, and not in its explicit list, asERROR. So this normal reason becomes an error titled "Printer error".JobViewer.update_status()pushes the worst reason's description to the status bar, so the error is shown while the job finishes.- #72 already added this reason to the blacklist in
notify_printer_state_reason_if_important(), so desktop notifications are suppressed, but the status bar path still uses theERRORlevel.
Steps to reproduce
- Use a driverless IPP printer (here via a cups-browsed
implicitclass://queue; anyipp/ippsqueue uses the same backend code path). - Open the job viewer:
system-config-printer --show-jobs <queue>. - Print a multi-page document.
- When all data has been sent and the printer is still printing, the status bar shows "Printer error".
Expected: no error; the job completes normally.
Actual: "Printer error" while the backend waits for completion. The job ends as completed and the printer reports job-completed-successfully.
Suggested fix
Classify the reason as REPORT in StateReason.get_level(), next to the other cups-* informational reasons. This fixes the status bar and the notification path at their shared source:
if (self.reason.endswith ("-report") or
self.reason in ["connecting-to-device",
+ "cups-waiting-for-job-completed",
"cups-ipp-missing-cancel-job",
Environment
- system-config-printer 1.5.18 (Ubuntu package 1.5.18-1ubuntu9), code unchanged on
masterat c40cbbb - CUPS 2.4.7, cups-browsed 2.0.0
- Linux Mint 22.3 (Cinnamon)
- Printer: HP Color LaserJet Pro MFP 3302 (IPPS)
- 主要语言
- Python
- 星标
- 209
- 派生
- 111
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 8
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenPrinting/system-config-printer 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 44/100
OpenPrinting/system-config-printer#499 ·
维护者通常 2 天内回复
-
[Release Tracking] system-config-printer 1.5.19 milestone可能已有人在做 @alexpevzner 于 16 天前认领。 未关闭
OpenPrinting/system-config-printer#492 · 1 条评论 · 已指派 2 人 ·
维护者通常 2 天内回复
-
Scanner未关闭
难度 3/5 1-2 天 新手友好度 25/100
OpenPrinting/system-config-printer#407 · 1 条评论 ·
维护者通常 2 天内回复
-
Doesn't run with PYTHONSAFEPATH enabled可能已有人在做 @xovishnukosuri 于 250 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 58/100
OpenPrinting/system-config-printer#387 ·
维护者通常 2 天内回复
-
system-config-printer can't open printer properties because job-cancel-after value is None可能已有人在做 @xovishnukosuri 于 250 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 55/100
OpenPrinting/system-config-printer#385 · 1 条评论 ·
维护者通常 2 天内回复
查看 OpenPrinting/system-config-printer 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 61/100
scverse/infercnvpy#238 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
skrub-data/skrub#2442 ·
维护者通常 1 天内回复
-
due_at is one hour late on the autumn DST change day (real-time delta added to a zoneinfo datetime)未关闭
难度 2/5 1-3 小时 新手友好度 74/100
-
难度 2/5 1-3 小时 新手友好度 77/100
open-feature/python-sdk-contrib#482 ·
维护者通常 1 天内回复
-
enhancement
难度 1/5 1 小时以内 新手友好度 94/100
warlock20/StartWithA#443 ·
维护者通常 1 天内回复