Jump to content

[SOLVED] Keychain error using alfred-workflow python


Recommended Posts

Posted

Hi,

I'm tying to get my first workflow up and running. However I get an exception when using alfred-workflow. I'm trying to save a keychain using wf.save_password('ha_password', args.apikey)

 

The exception that i get:

[2018-03-21 14:19:55][ERROR: action.script] .

14:19:55 workflow.py:2057 DEBUG    ---------- Home Assistant ----------

14:19:55 workflow.py:2074 ERROR    Unknown Keychain error : security: SecKeychainItemCreateFromContent (<default>): The user name or passphrase you entered is not correct.

Traceback (most recent call last):

  File "/Users/andreas/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.A66C80D9-3423-441F-BEFA-CD9F0317B9A2/workflow/workflow.py", line 2067, in run

    func(self)

  File "home_assistant.py", line 50, in main

    wf.save_password('ha_password', args.apikey)

  File "/Users/andreas/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.A66C80D9-3423-441F-BEFA-CD9F0317B9A2/workflow/workflow.py", line 2407, in save_password

    '-w', password)

  File "/Users/andreas/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.A66C80D9-3423-441F-BEFA-CD9F0317B9A2/workflow/workflow.py", line 2817, in _call_security

    raise err

KeychainError: Unknown Keychain error : security: SecKeychainItemCreateFromContent (<default>): The user name or passphrase you entered is not correct.

 

I'm on High Sierra,  10.13.3. Alfred is freashly installled and alfred-workflow is fetched today.

Someone any ideas?

 

Thanks!

//Andreas

Posted

Hi,

I found a solution to the problem. It seems to be a bug in High Sierra, regarding keychains.

 

The fix:

Try opening Keychain Access.app. Right-click on the login keychain and try locking it and then unlocking it again.

 

Thanks!

//Andreas

  • vitor changed the title to [SOLVED] Keychain error using alfred-workflow python

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...