Bug #2124

update python-qrcode package in Fedora

Added by abeluck over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:10/17/2013
Priority:HighDue date:
Assignee:abeluck% Done:

0%

Category:-
Target version:0.2
Component:

Description

The qrcode displaying is broken in fedora. I'm not sure if it is because the python-qrcode package is old or if PIL is to blame.

python-qrcode-2.4.1-3
python-imaging-1.1.7-7
python-imaging-tk-1.1.7-7

The error:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/lib-tk/Tkinter.py", line 1410, in __call__
    return self.func(*args)
  File "./keysync-gui", line 515, in convert_and_copy
    self.show('qrcode')
  File "./keysync-gui", line 155, in show
    self.setup_qrframe()
  File "./keysync-gui", line 417, in setup_qrframe
    self.tkimg = ImageTk.PhotoImage(img)
  File "/usr/lib64/python2.7/site-packages/PIL/ImageTk.py", line 109, in __init__
    mode = Image.getmodebase(mode)
  File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 245, in getmodebase
    return ImageMode.getmode(mode).basemode
  File "/usr/lib64/python2.7/site-packages/PIL/ImageMode.py", line 50, in getmode
    return _modes[mode]
KeyError: <qrcode.image.pil.PilImage object at 0x2f88710>

I don't really want to package qrcode or PIL at this point.

Associated revisions

Revision c961e33d
Added by Abel Luck over 4 years ago

setup.py: add minimum required qrcode version

refs #2124

Revision c961e33d
Added by Abel Luck over 4 years ago

setup.py: add minimum required qrcode version

refs #2124

History

#1 Updated by abeluck over 4 years ago

  • Subject changed from qrcode is broken in fedora to qrcode or PL is broken in fedora

See my commit that addresses this.

For now I think we should write the qrcode to disk (like we did before 91c2b11b903903a0cd71a047bb361c7448c40c4c), because that works at least.

For 0.3 I can debug this and see if we can get around the bug without packaging PIL or qrcode.

#2 Updated by hans over 4 years ago

  • Assignee set to abeluck

This is fixed in a more recent release of python-qrcode. I think you should update the qrcode package, it should be straightforward to update the package, the build system and files are the same. Plus, since all of your packages are in the same repo, it won't change the user perspective. Until keysync itself is included in fedora, users will have to go to OBS to get it anyhow.

The idea here is to make keysync leave as few traces as possible. That QR code image is a password, and its based on the private key material. So its better to avoid writing it to disk.

Another option is just having fedora users install from pip for now.

#3 Updated by hans over 4 years ago

  • Subject changed from qrcode or PL is broken in fedora to update python-qrcode package in Fedora
  • Target version changed from 0.2 to 0.3

#4 Updated by abeluck over 4 years ago

Sure. If packaging qrcode is all it takes, I agree. I don't want to package PIL though.

#5 Updated by abeluck over 4 years ago

  • Status changed from New to In Progress
  • Target version changed from 0.3 to 0.2

Huzzah! Updating qrcode to 4.0.1 fixed this issue. Uploading the new package to OBS.

We'll be able to provide Fedora packages for 0.2 after all.

#6 Updated by abeluck over 4 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF