Jump to content
Sign in to follow this  
Browall

[SOLVED] Keychain error using alfred-workflow python

Recommended Posts

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

Share this post


Link to post

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

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  
×
×
  • Create New...