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

cups.IPPError: (1280, 'Success') #25

Open
paulwarwicker opened this issue Oct 10, 2020 · 2 comments
Open

cups.IPPError: (1280, 'Success') #25

paulwarwicker opened this issue Oct 10, 2020 · 2 comments

Comments

@paulwarwicker
Copy link

I am trying to run this from a Windows host running Docker/WSL2. The docker image is built and is run with the command below. There is some output from the printer (two blank sheets and a lead sheet) which suggests that contact is made from the script using an HTTP post from CUPS. This is mentioned on the lead sheet.

PS C:\opt\sw\src\repos\airprint-generate> docker run --rm -it -v C:\opt\sw\src\repos\airprint-generate:/tmp airprint-generate:latest -H 192.168.1.1 -P 9100 -d /tmp
Traceback (most recent call last):
  File "./airprint-generate.py", line 279, in <module>
    apg.generate()
  File "./airprint-generate.py", line 124, in generate
    printers = conn.getPrinters()
cups.IPPError: (1280, 'Success')
PS C:\opt\sw\src\repos\airprint-generate>

Any comment?

Thanks
-paul

@dossy
Copy link

dossy commented Oct 10, 2020

I don't do much with Windows/WSL, so I haven't seen this particular error, but CUPS IPP error 1280 is a CUPS internal server error, so you'll want to look in the CUPS server error log (/var/log/cups/error_log) to see what the error is.

@paulwarwicker
Copy link
Author

When I dug further, CUPS is not actually installed. The printer is connected by USB to a router running OpenWRT, and CUPS is not recommended. It has its own printer server, p910nd.

I did manage to get the script working by installing CUPS on a separate VM which runs 24x7. The VM now has a printer defined to use the printer over port 9100 on the router. The VM is also running avahi-daemon and is announcing the printer using the service definition from the script.

Unfortunately, despite tools such as avahi-browse and avahi-discover can see these printers, my iOS devices claim that no AirPrint printers can be found. But that appears to be a problem unrelated to the running of this script.

Coincidentally, I got exactly the same error when running against the CUPS server. Just to clarify, I had to configure CUPS to be able to connect from any host (the default is the local server only) and secondly, to disable the access control in order for the script to complete. However, because the avahi-daemon was running under systemctl, there were no logs to inspect. You had to use systemctl to see any daemon output.

Thanks anyway. Although I still don't have a working AirPrint printer, you made me question my setup.

-paul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants