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

IndexError: list index out of range #3

Open
Megidd opened this issue Apr 17, 2024 · 1 comment
Open

IndexError: list index out of range #3

Megidd opened this issue Apr 17, 2024 · 1 comment

Comments

@Megidd
Copy link

Megidd commented Apr 17, 2024

The following error is received when a test page is sent to the printer by Windows:

(virtual_env) C:\Users\m3\repos\virtualPrinter>python myPrinter.py
GHOSTSCRIPT_APP="C:\Program Files\gs\gs10.03.0\bin\gswin64c.exe"
Starting printer... [CTRL+C to stop]
Opening 127.0.0.1:51349
b'Microsoft (R) Windows Script Host Version 5.812\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\n\r\nCreated/updated port Print to Image Port\r\n'
['rundll32', 'printui.dll,PrintUIEntry', '/if', '/b', 'Print to Image', '/r', 'Print to Image Port', '/m', 'HP Color LaserJet 2800 Series PS', '/Z']
b''
b''

Listening for incoming print job...
Incoming job... spooling...
Traceback (most recent call last):
  File "C:\Users\m3\repos\virtualPrinter\myPrinter.py", line 97, in <module>
    p.run()
  File "C:\Users\m3\repos\virtualPrinter\printer.py", line 140, in run
    self._server.run()
  File "C:\Users\m3\repos\virtualPrinter\printServer.py", line 157, in run
    header='@'+combinedBuf.split('%!PS-',1)[0].split('@',1)[1]
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
@Megidd
Copy link
Author

Megidd commented Apr 17, 2024

The error is thrown while printing both image documents and text documents.

Image document

2024-04-17 12_36_30-printServer py - virtualPrinter - Visual Studio Code

Text document

2024-04-17 12_43_19-printServer py - virtualPrinter - Visual Studio Code

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

1 participant