Coder Social home page Coder Social logo

Cannot Set Settings about lp-vault-manager HOT 10 CLOSED

bachya avatar bachya commented on July 3, 2024
Cannot Set Settings

from lp-vault-manager.

Comments (10)

shkm avatar shkm commented on July 3, 2024

Same problem here. It's probably erroring out.

Try clicking the debug button in the workflow's tab, which will give you an error console as shown:

alfred preferences 2015-01-07 11-24-05

Also take a look at this issue

from lp-vault-manager.

shkm avatar shkm commented on July 3, 2024

Since I'm suffering the same problem, here's some more information.

I'm running the brand new 3.2 pre-release. Python is 2.7.9, installed via Homebrew. Yosemite 10.10.1.

Error upon running lpsettings:

[ERROR: alfred.workflow.input.scriptfilter] Code 1: Traceback (most recent call last):
  File "settings.py", line 337, in <module>
    wf.settings.setdefault(
  File "/Users/jamie/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.2E81E083-924E-42B7-BE32-A4526307F271/workflow/workflow.py", line 1378, in settings
    self._default_settings)
  File "/Users/jamie/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.2E81E083-924E-42B7-BE32-A4526307F271/workflow/workflow.py", line 802, in __init__
    self._load()
  File "/Users/jamie/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.2E81E083-924E-42B7-BE32-A4526307F271/workflow/workflow.py", line 813, in _load
    for key, value in json.load(file_obj, encoding='utf-8').items():
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 351, in loads
    return cls(encoding=encoding, **kw).decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

from lp-vault-manager.

bachya avatar bachya commented on July 3, 2024

Hi guys – sorry you're having troubles. I'll work with you to sort them out.

@shkm: what happens if you open Terminal and run cat ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.bachya.lpvm/settings.json?

from lp-vault-manager.

shkm avatar shkm commented on July 3, 2024

Here we go. Looks quite all right to me!

Debonair :: ~ % cat ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/com.bachya.lpvm/settings.json
{
  "general": {
    "browser": 1,
    "cache_bust": 300
  },
  "lastpass": {
    "path": "/usr/local/bin/lpass",
    "username": “[email protected]”
  },
  "passwords": {
    "length": 20,
    "number": 10
  }
}% 

Debonair :: ~ % which /usr/local/bin/lpass
/usr/local/bin/lpass

from lp-vault-manager.

bachya avatar bachya commented on July 3, 2024

Not sure what that's all about – I've published a new pre-release that may help us figure out what's going on. Try this and see if lpsettings works?

https://github.com/bachya/lp-vault-manager/releases/download/v3.2/LastPass.Vault.Manager.alfredworkflow

from lp-vault-manager.

shkm avatar shkm commented on July 3, 2024

The error above was taken from that version, @bachya. Perhaps it's something to do with my system or something. lpass and python were installed via homebrew, whilst Alfred was installed via homebrew cask, if that helps any.

from lp-vault-manager.

bachya avatar bachya commented on July 3, 2024

@shkm, the release number is the same, but that's actually a link to a new .alfredworkflow give (I'm choosing not to bump version numbers until I'm sure my changes are working). Try it and let me know?

from lp-vault-manager.

shkm avatar shkm commented on July 3, 2024

Ah, fair enough!

Just gave it a shot, and unfortunately the error is still the same.

Side-track: thanks for this great workflow. Can't wait to start using it!

from lp-vault-manager.

shkm avatar shkm commented on July 3, 2024

Oh, dear, I've found the problem. Look again at my settings.json, particularly:

 "username": “[email protected]

The quotes are incorrect. I have no idea how this happened — I do recall editing the settings file at some point, but it's very unlikely that I'd have used anything but vim to do it, which wouldn't have inserted smart quotes.

Oh, well. It seems to be working now! Sorry to waste your time.

from lp-vault-manager.

bachya avatar bachya commented on July 3, 2024

Great to hear, @shkm. That's a tricky one, indeed. My guess is that if you edited the file via the lpsettings command, TextEdit is to blame. Fortunately, you can prevent this rich text behavior inside the TextEdit properties:

screen shot 2015-01-09 at 11 46 33 am

I'll make sure to put a note in the README.

from lp-vault-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.