-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
I would like to use python-ipp to query the list of printers on the system, as specified by Get-Printers in the IPP System Service. However, python-ipp seems to add a spurious printer-uri attribute and the request fails:
async with IPP(f'ipp://localhost:8000/ipp/system') as ipp:
response = await ipp.execute(
IppOperation.GET_PRINTERS,
{
'version': (2, 0),
'operation-attributes-tag': {
'system-uri': 'ipp://localhost:8000/ipp/system',
'attributes-charset': 'utf-8',
'attributes-natural-language': 'en-us',
'requesting-user-name': 'ak',
}
},
)->
pyipp.exceptions.IPPError: ('Unexpected printer status code', {'status-code': 1030})
The request, as printed by the server, seems to have a printer-uri attribute and the system-uri attribute is missing.
HTTP_STATE_POST http://localhost:8000/ipp/system HTTP/1.1 ()
Get-Printers request: IPP/2.0 request-id=89387
Get-Printers request: operation-attributes-tag
Get-Printers request: attributes-charset charset utf-8
Get-Printers request: attributes-natural-language naturalLanguage en-us
Get-Printers request: printer-uri uri ipp://localhost:8000/ipp/system
Get-Printers request: requesting-user-name nameWithoutLanguage ak
Get-Printers client-error-not-found (printer-uri ipp://localhost:8000/ipp/system not found.)
OK application/ipp 148
Get-Printers response: IPP/2.0 request-id=89387, status-code=client-error-not-found
Get-Printers response: operation-attributes-tag
Get-Printers response: attributes-charset charset utf-8
Get-Printers response: attributes-natural-language naturalLanguage en-us
Get-Printers response: status-message textWithoutLanguage printer-uri ipp://localhost:8000/ipp/system not found.
Closing connection from 'localhost'.
How do I get this to work? Is this even supported?
Metadata
Metadata
Assignees
Labels
No labels