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

Printer not working #580

Closed
NiraCity opened this issue May 8, 2024 · 8 comments
Closed

Printer not working #580

NiraCity opened this issue May 8, 2024 · 8 comments

Comments

@NiraCity
Copy link

NiraCity commented May 8, 2024

Hallo evryone.

I'm almost done with the photoboorh, but I can't print yet.

I have an HP LaserJet Pro M255.
And I can make a test print from cups. (localhost:631)

Only with Pibooth it doesn't print photos.

In the config file I have (under printer)

leave the name as default. but even when I enter the printer name there, it does not print.

printer_option is empty

printer view 10 sec

number of pages automatically sent to the printer = 1

Maximum number of printed pages = - 1

Maximum nuber of printed pages = 3

picture per page is 1.

Does anyone know what else I need to adjust to get the printer working?

@NiraCity NiraCity added the bug label May 8, 2024
@NiraCity
Copy link
Author

NiraCity commented May 8, 2024

These are my setting.
This is easier than described above

Name of the printer defined in CUPS (or use the 'default' one)
printer_name = default

Print options passed to the printer, shall be a valid Python dictionary
printer_options = {}

How long is the print view in seconds (0 to skip it)
printer_delay = 10

Number of pages automatically sent to the printer (or use 'max' to reach max duplicate)
auto_print = 1

Maximum number of printed pages before warning on paper/ink levels (-1 = infinite)
max_pages = -1

Maximum number of duplicate pages sent to the printer (avoid paper waste)
max_duplicates = 3

Print 1, 2, 3 or 4 picture copies per page
pictures_per_page = 1

@NiraCity
Copy link
Author

NiraCity commented May 8, 2024

I also watched this video .
https://www.youtube.com/watch?v=nCcTX7C7kwA&ab_channel=CarolineDunn

In the terminal i entered the following command:
sudo usermod -a -G lpadmin pi

@NiraCity
Copy link
Author

$ pibooth-printcfg --json
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: Your system is neon capable but pygame was not built with support for it. The performance of some of your blits could be adversely affected. Consider enabling compile time detection with environment variables like PYGAME_DETECT_AVX2=1 if you are compiling without cross compilation.
return f(*args, **kwds)
pygame 2.5.2 (SDL 2.0.9, Python 3.7.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
pygame-menu 4.0.7
^[[A^[[AINFO:pibooth:Connected to printer 'HP_ColorLaserJet_M255-M256'
{"PageSize": "A4", "PageRegion": "A4", "Duplex": "None", "InputSlot": "Auto", "HPOption_Duplexer": "False", "HPPJLColorAsGray": "no", "HPRGBEmulation": "DefaultSRGB", "HPEdgeControl": "Normal", "HPGeneralHalftone": "Smooth", "HPTextNeutralGrays": "Black", "HPGraphicsNeutralGrays": "Black", "HPPhotoNeutralGrays": "ProcessBlack", "HPPJLEconoMode": "False", "MediaType": "Unspecified"}

$ pibooth-diag
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: Your system is neon capable but pygame was not built with support for it. The performance of some of your blits could be adversely affected. Consider enabling compile time detection with environment variables like PYGAME_DETECT_AVX2=1 if you are compiling without cross compilation.
return f(*args, **kwds)
pygame 2.5.2 (SDL 2.0.9, Python 3.7.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
pygame-menu 4.0.7
Pibooth version installed: 2.0.8
Installed plugins: sound-effects-0.0.3, extra-lights-1.0.2, picture-template-1.1.0
gPhoto2 not installed, cannot diagnose connected DSLR

@NiraCity
Copy link
Author

NiraCity commented May 13, 2024

When starting the software i get the message.

~ $ pibooth
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: Your system is neon capable but pygame was not built with support for it. The performance of some of your blits could be adversely affected. Consider enabling compile time detection with environment variables like PYGAME_DETECT_AVX2=1 if you are compiling without cross compilation.
return f(*args, **kwds)
pygame 2.5.2 (SDL 2.0.9, Python 3.7.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
pygame-menu 4.0.7
[ INFO ] pibooth : Installed plugins: sound-effects-0.0.3, extra-lights-1.0.2, picture-template-1.1.0
[ INFO ] pibooth : Starting the photo booth application on Raspberry pi 4B
VIDIOC_QUERYCTRL: Input/output error
[ INFO ] pibooth : Configuring OpenCV camera ...
VIDEOIO ERROR: V4L2: setting property #30 is not supported
[ WARNING ] pibooth : No printer found (pycups or pycups-notify not installed)

Anybody know what i can change?
Do i also have to install Pycups and or Pycups-Notify?
I can't find in the manual i have to do this.
I found pycups and the notify
https://pypi.org/project/pycups/
https://pypi.org/project/pycups-notify
But if i goole i find it is the same as
sudo apt-get install libcups2-dev

i also did what described on this page
https://www.howtogeek.com/169679/how-to-add-a-printer-to-your-raspberry-pi-or-other-linux-computer/
Like the link in the Pibooth manual.

[ WARNING ] pibooth : No printer found (pycups or pycups-notify not installed)
It looks like cups is not installed but I can make a test print and print from the text editor but i still get the message
I installed sudo apt-get install libcups2-dev

@NiraCity
Copy link
Author

Tomorrow I will try to Install pycups by the follow link

https://github.com/anxuae/pycups-notify.git
And
https://github.com/OpenPrinting/pycups.git

Hope that will work.

@werdeil
Copy link
Member

werdeil commented May 14, 2024

Hi @NiraCity , you indeed need to have both pycups and pycups-notify installed. Both shall have been installed along with pibooth when running

sudo pip3 install pibooth[dslr,printer]

Did you install with this command? You can always fix it by running the following command:

sudo pip3 install pycups==1.9.73 pycups-notify==0.0.4

@NiraCity
Copy link
Author

Thank you very much for your response.

Now it works, so I should have installed an older version?

Thank you

@werdeil
Copy link
Member

werdeil commented May 17, 2024

Now it works, so I should have installed an older version?

No I think you installed it without the printer option that's all. I added the documentation tag to improve it on this (not the common pip command to have this kind of option)

@werdeil werdeil closed this as completed May 17, 2024
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

2 participants