pyinstaller icon indicating copy to clipboard operation
pyinstaller copied to clipboard

Keyrings with pyinstaller | Linux

Open idanless opened this issue 3 years ago • 11 comments

Hi

I have centos 7 with Keyrings when I try to do pyinstaller --OneFile

I got this error below keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.

I read this error here but all the solutions for windows not working on Linux anyone has any idea how to fix it? is look like i need to add the KWallet but don't know how

idanless avatar Aug 30 '22 19:08 idanless

Can you provide a minimal example that triggers this issue (i.e., are you trying to force a particular backend)?

Does the following example work if you try to freeze it?

# program.py
import keyring
print(keyring.get_keyring())

rokm avatar Aug 30 '22 19:08 rokm

Can you provide a minimal example that triggers this issue (i.e., are you trying to force a particular backend)?

Does the following example work if you try to freeze it?

# program.py
import keyring
print(keyring.get_keyring())

hi working keyring.backends.fail.Keyring (priority: 0) my code is simple

import keyring keyring.get_password('ser','User')

idanless avatar Aug 31 '22 11:08 idanless

What version of PyInstaller are you using? (And for that matter, what version of python and keyring)?

rokm avatar Aug 31 '22 12:08 rokm

Mind filling out the issue template so that we don't have to play ping pong for the generic details?

bwoodsend avatar Aug 31 '22 17:08 bwoodsend

Hi

Let me know if more information or debug

info: Name: pyinstaller Version: 4.10 Name: keyring Version: 23.4.1 Python 3.6.8 (default, Nov 16 2020, 16:55:22)

OS: NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31"

idanless avatar Sep 01 '22 08:09 idanless

So what is the output of

# program.py
import keyring
print(keyring.get_keyring())
keyring.get_password('ser','User')

if you run it in your python environment (without PyInstaller)?

Does it also print keyring.backends.fail.Keyring (priority: 0)?

rokm avatar Sep 01 '22 09:09 rokm

So what is the output of

# program.py
import keyring
print(keyring.get_keyring())
keyring.get_password('ser','User')

if you run it in your python environment (without PyInstaller)?

Does it also print keyring.backends.fail.Keyring (priority: 0)?

this work also I do "pyarmor" without pack and also working fine by the way, I was needed to install KWallet maybe this help

idanless avatar Sep 01 '22 12:09 idanless

Hmm, I suppose you are using KWallet backend (other backends do not seem to work on CentOS7), and the problem might be collection of dbus-python...

rokm avatar Sep 01 '22 12:09 rokm

Hmmm, nope, the frozen test program works in my test CentOS7 VM with KDE and KWallet installed, same as unfrozen version.

You are running the frozen program from within the desktop session, so that it has access to the session D-Bus, right?

Can you freeze the test program, archive the resulting build and dist directories, and upload the archive somewhere so I can take a look?

rokm avatar Sep 01 '22 12:09 rokm

I have the same issue on CentOS 7.

shalailahaas avatar Sep 02 '22 15:09 shalailahaas

I have the same issue on CentOS 7.

I will be off 10 days this week can you support the case? if this is fine form your side if not I will back and provide the logs and the test they reqsteted

idanless avatar Sep 02 '22 19:09 idanless