Code Monkey home page Code Monkey logo

Comments (9)

jibbius avatar jibbius commented on May 30, 2024

Hi,
Is the intention that each of the four frames is printed as a separate print?

Without looking into Cups at all, it looks like the line of code;
‘printCups(photo_number, filename_prefix)‘

... might need to be raised up slightly, and indented, so much that it is in the same code block as the ‘taking_photo’ line?

Let me know how you go, and I can look at tomorrow if still stuck.

from raspberry_pi_photo_booth.

ricochebonjour avatar ricochebonjour commented on May 30, 2024

I get this with printCups in the same block code as 'taking_photo' :
Welcome to the photo booth! Press the button to take a photo Button pressed! You folks are in for a treat! ...3 ...2 ...1 Photo (1) saved: /home/pi/raspberry_pi_photo_booth/photos/2018-03-12_19-33-19_1of4.jpg unexpected error: [Errno 2] No such file or directory: '/home/pi/raspberry_pi_photo_booth/photos/2018-03-12_19-33-19/1of4.jpg'

I get this with printCups at the end :
Welcome to the photo booth! Press the button to take a photo Button pressed! You folks are in for a treat! ...3 ...2 ...1 Photo (1) saved: /home/pi/raspberry_pi_photo_booth/photos/2018-03-12_18-55-32_1of4.jpg ...3 ...2 ...1 Photo (2) saved: /home/pi/raspberry_pi_photo_booth/photos/2018-03-12_18-55-32_2of4.jpg ...3 ...2 ...1 Photo (3) saved: /home/pi/raspberry_pi_photo_booth/photos/2018-03-12_18-55-32_3of4.jpg ...3 ...2 ...1 Photo (4) saved: /home/pi/raspberry_pi_photo_booth/photos/2018-03-12_18-55-32_4of4.jpg unexpected error: [Errno 2] No such file or directory: '/home/pi/raspberry_pi_photo_booth/photos/2018-03-12_18-55-32/4of4.jpg'

from raspberry_pi_photo_booth.

ricochebonjour avatar ricochebonjour commented on May 30, 2024

Changed filename values in printCups and now get this;
Welcome to the photo booth! Press the button to take a photo Button pressed! You folks are in for a treat! ...3 ...2 ...1 Photo (1) saved: /home/pi/raspberry_pi_photo_booth/photos/2018-03-12_19-45-33_1of1.jpg unexpected error: 'dict_keys' object does not support indexing

from raspberry_pi_photo_booth.

jibbius avatar jibbius commented on May 30, 2024

Great, file name error is now fixed.

Re: dict_name, do you get the same problem using python2 instead of python3?

I’m looking at this;
https://stackoverflow.com/questions/17322668/typeerror-dict-keys-object-does-not-support-indexing

from raspberry_pi_photo_booth.

ricochebonjour avatar ricochebonjour commented on May 30, 2024

Yeah, I try to find what's wrong with printer_name = printers.keys()[0] to change it.

I get this with python2;
('unexpected error: ', 'unicode or bytes object required')

Edit : Changed the code with your stackoverflow link ! 👍
Now got the same error in python3

from raspberry_pi_photo_booth.

jibbius avatar jibbius commented on May 30, 2024

Possibly an issue with this line;
conn.printFile("Printing", photo_number, "from", filename_prefix,{"copies": "1"})

Possibly needs to be something like:

title = "Photo " + photo_number
conn.printFile(printer_name, filename, title,{"copies": "1"})

from raspberry_pi_photo_booth.

ricochebonjour avatar ricochebonjour commented on May 30, 2024

Hi Jack,
Yes there was an issue with conn.printFile fixed with this;
'conn.printFile(printer_name, photo_number, filename_prefix,{"copies": "1"})'

And a line was missing in printCups to enable the printer;
'conn.enablePrinter(printer_name)'

Thank's for your help !

Now I would like to manage a dither filter on the photo before it goes to the thermal printer... :)

from raspberry_pi_photo_booth.

jibbius avatar jibbius commented on May 30, 2024

Glad to hear is now solved!
Good luck with the rest of the build.
Would be great to see what your finished photo booth looks like (if you’re happy to share).

Cheers,
Jack

from raspberry_pi_photo_booth.

ricochebonjour avatar ricochebonjour commented on May 30, 2024

For sure !
Cheers,

from raspberry_pi_photo_booth.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.