Skip to content
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

[BUG] [VSCode Extension] - Web VScode - Compute Instance #325

Closed
jakeatmsft opened this issue Sep 6, 2023 · 1 comment
Closed

[BUG] [VSCode Extension] - Web VScode - Compute Instance #325

jakeatmsft opened this issue Sep 6, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jakeatmsft
Copy link

jakeatmsft commented Sep 6, 2023

Describe the bug
Unable to create AzureOpenAI connection in VSCode Web

How To Reproduce the bug
Steps to reproduce the behavior, how frequent can you experience the bug:

  1. Install PromptFlow extension
  2. Create Connection

Screenshots

  1. On the VSCode primary side bar > the Prompt flow pane > quick access section. Find the "install dependencies" action. Please it and attach the screenshots there.
image image

Environment Information

  • Promptflow Package Version using pf -v:
  • Operating System: Ubuntu
  • Python Version using python --version: [e.g. python==3.10.12]
  • VS Code version.
  • Prompt Flow extension version.
  • On the VS Code bottom pane > Output pivot > "prompt flow" channel, find the error message could be relevant to the issue and past them here. That would be helpful for our trouble shooting.
  • If your code to repro the issue is public and you want to share us, please share the link.

Additional context

Attempted to pip install keyring, but the problem still persists.
Error:
/anaconda/envs/azureml_py310_sdkv2/bin/python /home/azureuser/.vscode-server/extensions/prompt-flow.prompt-flow-1.0.5/pfutil/pfutil.py connection upsert -f /home/azureuser/.promptflow/temp/new_AzureOpenAI_connection.yaml -o /tmp/pf-upsertConnection-f4aa11eb-a780-42f1-8663-2da7e0f386bc.json
Traceback (most recent call last):
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/_utils.py", line 155, in _get_from_keyring
return keyring.get_password(KEYRING_SYSTEM, KEYRING_ENCRYPTION_KEY_NAME)
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/keyring/core.py", line 56, in get_password
return get_keyring().get_password(service_name, username)
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/keyring/backends/fail.py", line 28, in get_password
raise NoKeyringError(msg)
keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/azureuser/.vscode-server/extensions/prompt-flow.prompt-flow-1.0.5/pfutil/_pf_vsc_connection.py", line 52, in upsert_connection
upsert_connection_new(args)
File "/home/azureuser/.vscode-server/extensions/prompt-flow.prompt-flow-1.0.5/pfutil/_pf_vsc_connection.py", line 65, in upsert_connection_new
connection = _upsert_connection_from_file(args.file)
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_cli/_pf/_connection.py", line 210, in _upsert_connection_from_file
connection = _client.connections.create_or_update(connection)
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/operations/_connection_operations.py", line 68, in create_or_update
orm_object = connection._to_orm_object()
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/entities/_connection.py", line 256, in _to_orm_object
secrets = self._validate_and_encrypt_secrets()
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/entities/_connection.py", line 137, in _validate_and_encrypt_secrets
encrypt_secrets[k] = encrypt_secret_value(v)
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/_utils.py", line 181, in encrypt_secret_value
encryption_key = get_encryption_key(generate_if_not_found=True)
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/_utils.py", line 164, in get_encryption_key
ENCRYPTION_KEY_IN_KEY_RING = _get_from_keyring()
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/_utils.py", line 157, in _get_from_keyring
raise StoreConnectionEncryptionKeyError(
promptflow._sdk._errors.StoreConnectionEncryptionKeyError: System keyring backend service not found in your operating system. See https://pypi.org/project/keyring/ to install requirement for different operating system, or 'pip install keyrings.alt' to use the third-party backend. Reach more detail about this error at https://microsoft.github.io/promptflow/how-to-guides/faq.html#connection-creation-failed-with-storeconnectionencryptionkeyerror

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/_utils.py", line 155, in _get_from_keyring
return keyring.get_password(KEYRING_SYSTEM, KEYRING_ENCRYPTION_KEY_NAME)
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/keyring/core.py", line 56, in get_password
return get_keyring().get_password(service_name, username)
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/keyring/backends/fail.py", line 28, in get_password
raise NoKeyringError(msg)
keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/azureuser/.vscode-server/extensions/prompt-flow.prompt-flow-1.0.5/pfutil/pfutil.py", line 3, in
main()
File "/home/azureuser/.vscode-server/extensions/prompt-flow.prompt-flow-1.0.5/pfutil/_pf_vsc_main.py", line 32, in main
operate_connection(args)
File "/home/azureuser/.vscode-server/extensions/prompt-flow.prompt-flow-1.0.5/pfutil/_pf_vsc_connection.py", line 29, in operate_connection
upsert_connection(args)
File "/home/azureuser/.vscode-server/extensions/prompt-flow.prompt-flow-1.0.5/pfutil/_pf_vsc_connection.py", line 58, in upsert_connection
connection = ConnectionOperations().create_or_update(connection)
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/operations/_connection_operations.py", line 68, in create_or_update
orm_object = connection._to_orm_object()
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/entities/_connection.py", line 256, in _to_orm_object
secrets = self._validate_and_encrypt_secrets()
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/entities/_connection.py", line 137, in _validate_and_encrypt_secrets
encrypt_secrets[k] = encrypt_secret_value(v)
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/_utils.py", line 181, in encrypt_secret_value
encryption_key = get_encryption_key(generate_if_not_found=True)
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/_utils.py", line 164, in get_encryption_key
ENCRYPTION_KEY_IN_KEY_RING = _get_from_keyring()
File "/anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/promptflow/_sdk/_utils.py", line 157, in _get_from_keyring
raise StoreConnectionEncryptionKeyError(
promptflow._sdk._errors.StoreConnectionEncryptionKeyError: System keyring backend service not found in your operating system. See https://pypi.org/project/keyring/ to install requirement for different operating system, or 'pip install keyrings.alt' to use the third-party backend. Reach more detail about this error at https://microsoft.github.io/promptflow/how-to-guides/faq.html#connection-creation-failed-with-storeconnectionencryptionkeyerror

Tasks

No tasks being tracked yet.
@jakeatmsft jakeatmsft added the bug Something isn't working label Sep 6, 2023
@wangchao1230 wangchao1230 self-assigned this Sep 7, 2023
@jakeatmsft
Copy link
Author

jakeatmsft commented Sep 7, 2023

Was able to create the connection after manually setting conda environment in the terminal to my promptflow environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants