Closed agile-jtdressel closed 3 years ago
https://github.com/1Password/connect-sdk-python/pull/16 introduced support for calling new_client_from_environment()
without passing a url
. It will be included in our next release.
The latest released version doesn't include this yet. You can find documentation for this version here: https://github.com/1Password/connect-sdk-python/tree/v1.0.1#usage .
Your proposed workaround will continue to work when we release the changes that make passing the URL optional, as we've kept the URL parameter for backwards compatibility.
Your environment
SDK Version: onepasswordconnectsdk==1.0.1
Connect Server Version: 1.2.0
OS: macOS 11.4 Intel
Python Version: Python 3.8.2
What happened?
After setting
OP_CONNECT_TOKEN
andOP_CONNECT_HOST
I calledclient_from_env: Client = new_client_from_environment()
This caused an error, because I was missing an argument.
What did you expect to happen?
I expected a client to be created.
I worked around this issue by adding the url to the call.
client_from_env: Client = new_client_from_environment(os.getenv('OP_CONNECT_HOST'))
Steps to reproduce
Script output:
Script:
Notes & Logs
OP_CONNECT_HOST
tolocalhost:8080
without thehttp://
protocol on front.