Symptoms -------- Using the command line >qr "sometext" myimage.png I get error "TypeError: must be str, not bytes" My system has python 3.4 as default. Workaround ---------- Changing console_scripts.py (line 60 in the current package) from > img.save(sys.stdout) to > img.save(sys.stdout.buffer) means qr is now working on my machine, and producing the qr code image. Possible Solution ----------------- A more sensible fix for the package is perhaps to add in a patch > - img.save(sys.stdout) > + img.save(sys.stdout.buffer if sys.version_info[0] >= 3 else sys.stdout) Which i found here :- https://github.com/lincolnloop/python-qrcode/issues/66 (its a bit ugly, but it looks like it should do the job until upstream sort it out)
Well yeah, but upstream said they will release a new version, try to ping the maintainer @github.
commit 1b4109b06fe34ac39f3fc55996d66a9b6cc8d809 Author: Justin Lecher <jlec@gentoo.org> Date: Thu Dec 3 10:37:05 2015 +0100 dev-python/qrcode: Backport fix for Python3 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=564930 Package-Manager: portage-2.2.25 Signed-off-by: Justin Lecher <jlec@gentoo.org> https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b4109b06fe34ac39f3fc55996d66a9b6cc8d809