#158 fedora-burn-yubikey crashes when attempting to burn: TypeError
Opened 4 years ago by keesdejong. Modified 4 years ago

With fedora-packager-0.6.0.2-5.fc30.src.rpm I get the following error:

# fedora-burn-yubikey -u $fas_id -S 2

Attention: You are about to reprogram your yubikey!  Please ensure it is
plugged in to your USB slot before continuing.  The secret key currently on
your yubikey will be destroyed as part of this operation!


Contacting https://admin.fedoraproject.org/accounts/
Password for $fas_id: 

New key generated in FAS, attempting to burn to yubikey

Traceback (most recent call last):
  File "/usr/sbin/fedora-burn-yubikey", line 80, in <module>
    ykconfig.mode_yubikey_otp('h:%s' % opts[1], 'h:%s' % opts[2])
  File "/usr/lib/python3.7/site-packages/yubico/yubikey_config.py", line 300, in mode_yubikey_otp
    if private_uid.startswith(b'h:'):
TypeError: startswith first arg must be str or a tuple of str, not bytes
Exception ignored in: <function YubiKeyHIDDevice.__del__ at 0x7fb92bd94f80>
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/yubico/yubikey_usb_hid.py", line 138, in __del__
  File "/usr/lib/python3.7/site-packages/yubico/yubikey_usb_hid.py", line 345, in _close
  File "/usr/lib/python3.7/site-packages/usb/legacy.py", line 235, in releaseInterface
  File "/usr/lib/python3.7/site-packages/usb/util.py", line 217, in release_interface
AttributeError: 'NoneType' object has no attribute '_ctx'

I also tested this in Fedora 29 in a VM, there it still worked.


@zbyszek I think you marked this as python3 compatible over in https://src.fedoraproject.org/rpms/fedora-packager/pull-request/3 ,but it looks like it's not fully?

Looks like that. I didn't test the script, I don't have a yubikey for that.

I could help out if any testing is needed. I'm afraid I don't have time to help out with a patch at the moment, I don't have the time to spare.

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #160 Merged 4 years ago