Error generating qrcode with non ascii character #7

Closed
smarro opened this Issue Mar 6, 2012 · 2 comments

Projects

None yet

2 participants

@smarro

Hi,

with the 2.3 version i get the following error (with 2.0 this didn't happened):

import qrcode
qr_string = u'Acuña'
qrcode.make(qr_string)

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/qrcode/main.py", line 12, in make
qr.add_data(data)
File "/usr/local/lib/python2.7/dist-packages/qrcode/main.py", line 42, in add_data
data = util.QRData(data)
File "/usr/local/lib/python2.7/dist-packages/qrcode/util.py", line 257, in init
data = str(data)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 3: ordinal not in range(128)

Thanks

PS: Great library!!

@SmileyChris
Lincoln Loop member

Hi smarro, fixed in 4a60107, bumped to 2.3.1 and uploaded to pypi.

@SmileyChris SmileyChris closed this Mar 6, 2012
@smarro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment