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

[FIX] Credential manager dialog at import #857

Conversation

ales-erjavec
Copy link
Contributor

Issue

At least with PyQt5 5.15.6 on linux simply running

python -c "import orangecontrib.text.widgets.ownyt"

pops-up a Unlock wallet/keychain,... dialog. Rejecting it then prints

Failed to get secret '__pyqtSignature__' of ''Orange3 - NY Times API Key''.
Traceback (most recent call last):
  File "/home/ales/devel/orange3/Orange/widgets/credentials.py", line 42, in __getattr__
    return keyring.get_password(self.service_name, item)
  File "/home/ales/.envs/orange3/lib/python3.10/site-packages/keyring/core.py", line 55, in get_password
    return get_keyring().get_password(service_name, username)
  File "/home/ales/.envs/orange3/lib/python3.10/site-packages/keyring/backends/chainer.py", line 51, in get_password
    password = keyring.get_password(service, username)
  File "/home/ales/.envs/orange3/lib/python3.10/site-packages/keyring/backends/SecretService.py", line 78, in get_password
    collection = self.get_preferred_collection()
  File "/home/ales/.envs/orange3/lib/python3.10/site-packages/keyring/backends/SecretService.py", line 67, in get_preferred_collection
    raise KeyringLocked("Failed to unlock the collection!")
keyring.errors.KeyringLocked: Failed to unlock the collection!

Running orange-canvas for the first time after installing orange3-text or running orange-canvas --force-discovery pops-up four dialogs in succession.

At least with PyQt5 5.15.6 the class scope members are inspected for __pyqtSignature__ attribute which triggers the credential dialog at import/startup time.

Description of changes

Move CredentialManager out of class level scope to instance scope.

Includes
  • Code changes
  • Tests
  • Documentation

At least with PyQt5 5.15.6 the class scope members are inspected for
`__pyqtSignature__` attribute which triggers the credential dialog at
import/startup time.
@PrimozGodec PrimozGodec merged commit 1ae7162 into biolab:master Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants