Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
Former Member
2 years agoCLI still has a bug when running "op create" programmatically
I am running "op create" programmatically and I get an error saying
[ERROR] 2023/12/06 11:47:57 invalid JSON in piped input
This was reported before https://1password.community/discussion/1289...
Former Member
2 years agoI can confirm on version 2.24.0 on OSX
when I call on my command line
op item create --category=login --vault=adrastea \
--generate-password=64,letters,digits --title=postgres/nfcbox-preview
=> item will be created successfully
when I call the same command programmatically from within python I get
File "/Users/REDACTED/.pyenv/versions/3.10.6/lib/python3.10/site-packages/exec_utils/exec_utils.py", line 49, in wait
raise ExecStrictError("error while executing %s,\nstdout: %s\nstderr: %s\n" % (
exec_utils.exec_strict_error.ExecStrictError: error while executing ['op', 'item', 'create', '--category=login', '--vault=adrastea', '--generate-password=64,letters,digits', '--title=postgres/nfcbox-preview'],
stdout:
stderr: [ERROR] 2023/12/16 13:59:02 invalid JSON in piped input
I assume you find no PTY and assume STDIN mode.