Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'NoneType' object does not support the context manager protocol when clicking on PIV #367

Open
dlazerka opened this issue Nov 8, 2024 · 0 comments

Comments

@dlazerka
Copy link

dlazerka commented Nov 8, 2024

  • YubiKey Manager version: 1.2.5
  • How was it installed?: just ran *.AppImage from my non-root user
  • Operating system and version: Linux Mint 21.3 Virginia Cinnamon (aka Ubuntu 22.04 jammy).
  • YubiKey model and version: Nano 5
  • Bug description summary: Error when clicking Application / PIV

Steps to reproduce

  1. Run the .AppImage (device recognized correctly).
  2. Click Applications menu.
  3. Click bottom menu item "PIV"

Expected result

No error

Actual results

Qt Quick Layouts: Polish loop detected. Aborting after two iterations.
Qt Quick Layouts: Polish loop detected. Aborting after two iterations.
Failed to open device
Traceback (most recent call last):
  File "qrc:///py/yubikey.py", line 78, in wrapped
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "qrc:///py/yubikey.py", line 300, in refresh_piv
    with self._open_device([SmartCardConnection]) as conn:
TypeError: 'NoneType' object does not support the context manager protocol

And red error message in GUI.

Other info

If trying to run from root user, and performing the same steps, the error logs are somewhat different:

[sudo] password for user:             
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Failed to open device
Traceback (most recent call last):
  File "qrc:///py/yubikey.py", line 78, in wrapped
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "qrc:///py/yubikey.py", line 300, in refresh_piv
    with self._open_device([SmartCardConnection]) as conn:
TypeError: 'NoneType' object does not support the context manager protocol
qml: qrc:/qml/PivView.qml:26: Error: Invalid write to global property "isMacOs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant