Comment 3 for bug 768237

Revision history for this message
Drew Scott Daniels (drewdaniels) wrote :

Hi,

Seems straight forward in where the problem is (though maybe not the root cause):
...
File "/usr/share/system-config-printer/monitor.py", line 553, in refresh
    if job['job-state'] < cups.IPP_JOB_CANCELED:
KeyError: 'job-state'
...
Relevant code:
    545 debugprint ("Created subscription %d" % self.sub_id)
    546
    547 if self.monitor_jobs:
    548 jobs = self.jobs.copy ()
    549 if self.which_jobs not in ['all', 'completed']:
    550 # Filter out completed jobs.
    551 filtered = {}
    552 for jobid, job in jobs.iteritems ():
    553 if job['job-state'] < cups.IPP_JOB_CANCELED:
    554 filtered[jobid] = job
    555 jobs = filtered

So job exists but doesn't have a state. I guess a check for job having that key could be done, but I don't know whether filtered is needed.

If you need debugging turned on, I may be able to help. I'd prefer instructions as I don't want to look it up. As it's python I could even add some code, but again I don't want to spend much time looking things up right now so some direction would speed things up for us.

Thanks,

     Drew Daniels
Blog: http://www.boxheap.net/ddaniels/blog