I am trying to get my webcam (connected to a Pi) to read qr codes. I was using zbar-tools for this but am currently getting the following error:
ERROR: zbar processor in zbar_processor_init():
system error : spawning input thread : invalid argument (22)
Any ideas on what might be causing this error and how I can fix it?
Had the same problem. The issue was that I was connecting via SSH. I would recommend that you first start the Raspberry Pi GUI using
startx
, then run your command from the Terminal editor. You can also opt to disable the display using thezbarcam --nodisplay
flag.If that still doesn't work, as it didn't for me, I started receiving a new error message:
I discovered, from this article, that you can use a prefix to launch zbar, which I had to slightly modify to:
This is the command that finally worked for me.