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時間
- マージ済み PR(30日)
- 8
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日以内に返信