-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
On Windows 10, binary (.exe) fails to find the keyring backend, but source doesn't #468
Comments
Hi Lily. Please have a look at #324, which covers the issues with Pyinstaller and Keyring lately including some workarounds and a link to the issue upstream in Pyinstaller. |
Please follow up in the other issue or follow up here if you find the issue you've encountered is different. |
Thanks!!! Sorry I didn't see that issue before, it doesn't show up very easily in searches apparently. The solution was adding the import to the script:
and then I got an error saying
worked like a charm! |
So there is an issue with keyring w.r.t. frozen installs (maybe also local). If you have pywin32 installed, it works fine locally. Take a note here, that a variant of this package, pywin32-ctypes, a rudimentary version of that package that works wholly within python, is already installed as its a dependency for keyring on windows. Due to an unknown reason, when running it fails to detect this, so some workaround is needed, _or_ the 'normal' pywin32 package should be installed. However, problems occurred when attempts where made to install pywin32 via cx_freeze. Then the actual workaround was encountered (jaraco/keyring#468), which _should_ hopefully let use use the keyring on windows without needing the 'full' version of pywin32. CURA-7180
This is similar to #339, however when run directly with python (tested 3.6, 3.7, 3.8) it works absolutely fine and keyring can access the Windows credentials manager, set and get passwords normally. Only after freezing the program with PyInstaller (tested 3.4, 3.5, 3.6, 4.0) it cannot access it anymore. The .exe runs normally however, and the only warnings PyInstaller gives are about failures to find "pkg_resources.py2_warn", "pkg_resources.markers" and "sip". Even with this, the program runs fine, it is only when I call for a password that it crashes with the following:
More details on the PyInstaller warnings, in case it is relevant...
I do not actually know for certain that this is an issue with the keyring module, but I really don't know what to do next, I stumbled across a few different issues, such as problems in the pywin32-ctypes (mine is version 0.2.0), and with setuptools (mine is version 50.3.0). However none of them seem to apply to this.
To Reproduce
A minimal working example is:
in a file
test.py
write:running with
python test.py
there are no errors and I can see the credential in the Windows credentials managerrunning
pyinstaller -c test.py
, and then.\dist\test\test.exe
I get:Note: pyinstaller still gives errors about not finding "pkg_resources.py2_warn" and "pkg_resources.markers" in this minimal example.
This was tested on Windows 10 Education version 1903.
It works just fine on Ubuntu 18.04... I'm stumped as to why it doesn't find the entry on Windows 10, and only after freezing.
Sorry if this does't belong here, any pointers in the right direction would be greatly appreciated.
Best,
Lily
The text was updated successfully, but these errors were encountered: