-
Notifications
You must be signed in to change notification settings - Fork 13
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
lpvs KeyError: u'hostname' #18
Comments
In the event that someone else has this issue it is caused by upgrading lastpass-cli to version 0.9.0. You can modify Updare the version URL and the sha256 values.
|
I am still having this issue after downgrading to cli 0.8.1. Not sure if it is environment related or python issues or what. |
I was having the issue above running on cli 0.8.1 and was getting the stacktrace.
I ended up tinkering with the code a little and eventually got a 'Cannot set attribute' error with both the args that are being passed in so 'search-vault-for-query ' I deleted the workflow from alfred, and reimported it. When I did, i ran I should also mention that I am running on el capitan 10.11.4 with python 2.7.11. I have no idea what was going on or what had changed, but at least it works now. |
Would be great if the developer would add support for the new lastpass-cli binary. |
It's not as feature rich, but @carterdanko created an alternative. |
Trying to follow Bradley's solution above, but I'm on Sierra. Any clues on what the hash to add for sierra should be?
Thanks! |
@crikeymiles2 When you do a I'm not sure on other support though for this workflow. The one Brad and I wrote works with sierra I know and is less feature rich than this one, but works with current lasspass-cli/alfredv3/sierra. |
This solved my issue:
It seems lastpass cli changed their export content and it does not contain |
Thanks @SharkyLV! That fixed if for me. Replacing all instances of |
@SharkyLV Thanks! It works for me! |
@SharkyLV That worked for me as well, thank you soo much!! |
Bummer. I tried @SharkyLV's suggestion with no luck. Now I am getting the error Thanks for the suggestion though! On the latest version of |
@levibostian replace all instances of |
...I feel stupid. I read your comment earlier and didn't make the connection. Sorry about that. Thank you! I will give that a shot. |
No problem :). I probably could have written that a bit more clearly to be honest... |
I went through the code and replaced all instances of Now I am back at Does anyone have a fork of the repo with this fix implemented that others can use and benefit from and we can get a fix merged in? I appreciate everyone's help here. Wish I could be of more help if I could get it figured out on my own machine 🤔. |
Ah well, in that case I can't help you, I haven't used this in months 🙄 |
Here is a re-write of the last pass vault search that I have been using daily without issues: |
Good! it is also work for alfred3. |
[ERROR: alfred.workflow.input.scriptfilter] Code 1: 22:26:56 workflow.py:1386 DEBUG Reading settings from
/Users/brad.hurley/Library/Application Support/Alfred 2/Workflow Data/com.bachya.lpvm/settings.json... 22:26:56 workflow.py:1960 DEBUG Workflow version : 4.2.0 22:26:56 lpvs_query.py:30 DEBUG Query arguments: [u'search-vault-for-query', u't'] 22:26:56 lpvs_query.py:38 DEBUG Parsed command: search-vault-for-query 22:26:56 lpvs_query.py:39 DEBUG Parsed argument: t 22:26:56 lpvs_query.py:40 DEBUG Parsed delimiter: > 22:26:56 lpvs_query.py:41 DEBUG Parsed query: search-vault-for-query t 22:26:56 lpvs_query.py:53 DEBUG Executing command: search-vault-for-query 22:26:56 workflow.py:1609 DEBUG Loading cached data from : /Users/brad.hurley/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.bachya.lpvm/vault_items.cpickle 22:26:56 workflow.py:1978 ERROR u'hostname' Traceback (most recent call last): File "/Users/brad.hurley/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.6446AD3B-324D-403F-B0D8-7BE4434ECE5C/workflow/workflow.py", line 1971, in run func(self) File "lpvs_query.py", line 55, in main output_query_vault_results(ap) File "lpvs_query.py", line 151, in output_query_vault_results results = util.search_vault_for_query(ap.arg) File "/Users/brad.hurley/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.6446AD3B-324D-403F-B0D8-7BE4434ECE5C/utilities.py", line 221, in search_vault_for_query match_on=MATCH_ALL ^ MATCH_ALLCHARS File "/Users/brad.hurley/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.6446AD3B-324D-403F-B0D8-7BE4434ECE5C/workflow/workflow.py", line 1791, in filter value = key(item).strip() File "/Users/brad.hurley/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.6446AD3B-324D-403F-B0D8-7BE4434ECE5C/utilities.py", line 199, in search_item_fields elements.append(item['hostname']) KeyError: u'hostname' 22:26:56 workflow.py:1996 DEBUG Workflow finished in 0.019 seconds.
When I run
lpass ls
the results look as I would expect.I added a debug statement to
utilities.search_item_fields
and all of the urls are populated, but the item list does not contain any hostnames.The text was updated successfully, but these errors were encountered: