Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error pop-up: Option 'finishings' has value '3' and cannot be edited #122

Closed
tillkamppeter opened this issue Oct 17, 2018 · 17 comments
Closed

Comments

@tillkamppeter
Copy link
Member

The following bug report appeared at Ubuntu:

https://bugs.launchpad.net/ubuntu/+source/system-config-printer/+bug/1780310

For some IPP printers appears an error pop-up with the message mentioned above (or similar message) when opening the printer properties dialog. It does not come to anything going wrong afterwards. There is only this dialog annoying the user with a message he does not understand.
A simple symptomatic fix would be to turn this error dialog into a debug message which appears in the terminal when running s-c-p with the --debug option. This should also be done when the actual cause of the bug gets fixed.
An actual fix would be to check s-c-p's compatibility with modern driverless IPP printers, for example supporting correctly all the attributes reported on a get-printer-attributes IPP request (IPP 2.x) and also taking into account that the options for driverless printing reported by IPP are NOT identical with the options in PPD files, even if the file is supplied by the printer's manufacturer.

@zdohnal
Copy link
Member

zdohnal commented Oct 18, 2018

Hi Till,
I'm sorry, I am unable to reproduce the issue - I have old HP Officejet Pro 8500 at the office (even older HP printer at home...), which provides only 'finishings-supported' and 'finishing-default' attributes, both set to number 3, which is 'None'.
I even tried to push forcefully different values of attributes or push only 'finishing' attribute into dictionary, which is gotten from getPrinterAttributes() method (defined in python-cups project), but without triggering the error message. I tried to open 'Printer properities' - which got into scope, where the error message can show - and 'View printer queue' - which the reporter said he used, at least IIUC.

@tillkamppeter , are you able to reproduce the issue? Then we can see the variables contents during debugging...

From what I see from code: attributes seems to be taken from printer by getPrinterAttributes() (even IPP 2.* ones), then got processed in cupshelpers/cupshelpers.py and divided into possible_attributes and other_attributes and in several object attributes. I thought this can be outcome of 'finishings' isn't in correct dictionary, but it seems it doesn't trigger the message too.

@petersilva
Copy link

I´m on ubuntu 18.04 printing to a ricoh network printer, and I see this problem.

@zdohnal
Copy link
Member

zdohnal commented Nov 6, 2018

@petersilva Would you mind debugging the issue then? Since I'm not able to reproduce it with my printer.

@merlijn-sebrechts
Copy link

I'm having the same issue, I can help debugging if you tell me what to do.

@zdohnal
Copy link
Member

zdohnal commented Nov 9, 2018

@galgalesh Thank you! I don't know which debugger you use - I use pudb - https://documen.tician.de/pudb/starting.html .
For start I would like to see what is in 'attrs' variable in getAttributes() method in cupshelpers/cupshelpers.py (line 118) after calling getPrinterAttributes() and contents of self.other_attributes and self.possible_attributes at the end of getAttributes() method.
Then from printerproperities.py (about lines 1399) I would like to see contents of 'option' variable, when option.name is 'finishings', self.printer.attributes and self.printer.possible_attributes.
If you would like more info how to do it, feel free to ask. Thank you!

@merlijn-sebrechts
Copy link

@zdohnal

I can see the value of these variables, but they are very big so they are cropped in the pudb UI. Is there an easy way for me to copy the full contents to clipboard or display it elsewhere?

image

@zdohnal
Copy link
Member

zdohnal commented Nov 12, 2018

Sorry, I don't know - but you can try to print out in python console in pudb UI and copy it from there (or use python commands to get variable contents) into some files, which you can attach here (they need to have .txt suffix to attach it here on github). I'm sorry for the inconvenience, and thank you again for helping me debugging!

@merlijn-sebrechts
Copy link

merlijn-sebrechts commented Nov 13, 2018

I did it with good-old print statements in the end. This didn't work for the options variable though, so I added screenshots of the vscode debugger for those. I have two printers that trow errors.

(note that the issue with "finishings" is in the second printer, the first printer has two other but similar errors.)

Printer 1: a driverless printer that was automatically added

Logs: https://pastebin.com/ghyi2Kw6
Errors:
image

image

Value of option in debugger for orientation-requested:

image

Value of option in debugger for print-quality:

image

Printer 2: a Ricoh Secure print queue configured with the ppd file supplied by ricoh

Logs: https://pastebin.com/mL8bWze6
Errors:
image

image

@merlijn-sebrechts
Copy link

@zdohnal Did you manage to take a look at this yet?

@zdohnal
Copy link
Member

zdohnal commented Dec 4, 2018

@galgalesh Sorry, not yet, other urgent issues on the plate... :(

@tillkamppeter
Copy link
Member Author

@zdohnal
Copy link
Member

zdohnal commented Jan 3, 2019

I did a temporary fix for now as you suggested, please check commit 04ddf2f . Hope, I'll get into more permanent solution in the future.

@tillkamppeter
Copy link
Member Author

Thank you very much for this temporary fix. I have applied it to the system-config-printer package of Ubuntu 19.04 (Disco) now.

@PorkCharsui79
Copy link

I get the same error.
Linux Mint 19 Tara
system-config-printer=1.5.11-1ubuntu2 (from ubuntu bionic repo)
The temporary workaround from commit 04ddf2f does get rid of the error message, but the setting remains unset.

@prlw1
Copy link

prlw1 commented Feb 26, 2019

Reached this bug as once again it was reproduced (ubuntu). (Remove label?)

@zdohnal zdohnal added the bug label Feb 27, 2019
@zdohnal
Copy link
Member

zdohnal commented Feb 27, 2019

(Remove label?)

The label is there because 'I' as upstream cannot reproduce it, because I do not have HW for it. IMO the label is correct, because I can only study logs of @galgalesh , who was so kind to provide debugging logs. To sum it up, it makes its fixing harder, because I cannot test it immediately....

@zdohnal
Copy link
Member

zdohnal commented Apr 24, 2020

Temporary fixed in 1.5.12.

@zdohnal zdohnal closed this as completed Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants