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

getPrinters not working (getDefault does) #28

Open
yarons opened this issue Dec 13, 2020 · 4 comments
Open

getPrinters not working (getDefault does) #28

yarons opened this issue Dec 13, 2020 · 4 comments

Comments

@yarons
Copy link

yarons commented Dec 13, 2020

I've encountered the following:

>>> printers = conn.getPrinters()
>>> print(printers)
{}
>>> printers = conn.getDefault()
>>> print(printers)
Citizen_CL-S621Z
>>> 

Am I doing something wrong?
Anything else I can provide in order to fix this?

@zdohnal
Copy link
Member

zdohnal commented Dec 14, 2020

Hi,

it depends what your cupsd daemon returns - I expect you run on localhost, so then check outputs of lpstat -a and lpoptions commands.

If the result is the same as cups module provided (no print queues seen when you did lpstat -a, and showing data for Citizen_CL-S621Z as output of lpoptions), then your CUPS setup is corrupted.

@yarons
Copy link
Author

yarons commented Dec 14, 2020

It's remote, can I run lpstat remotely?

@zdohnal
Copy link
Member

zdohnal commented Dec 14, 2020

lpstat -h, see man lpstat

@yarons
Copy link
Author

yarons commented Dec 15, 2020

I've connected to the cups docker instance (docker exec -ti 1 bash in my case).

And ran the following:

# lpstat -a
Citizen_CL-S621Z accepting requests since Tue 08 Dec 2020 11:16:25 AM UTC

And then:

# lpoptions
copies=1 device-uri=socket://10.0.0.37:9100 finishings=3 job-cancel-after=10800 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=0 number-up=1 printer-commands=none printer-info='Citizen CL-S621Z' printer-is-accepting-jobs=true printer-is-shared=false printer-is-temporary=false printer-location=Lab printer-make-and-model='CITIZEN Barcode Printer' printer-state=3 printer-state-change-time=1607426185 printer-state-reasons=none printer-type=2265156 printer-uri-supported=ipp://localhost/printers/Citizen_CL-S621Z

So I guess it's fine in that perspective, am I doing something wrong?
Thanks.

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