Azure-Samples / Azure-Samples/rag-data-openai-python-promptflow

provision.py erroring in local setup - missing 1 required positional argument: 'workspace_connection'

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
290
Forks
152
PR merge metrics
No merged PRs in 30d

Description

> Please provide us with the following information:
> ---------------------------------------------------------------

### This issue is for a: (mark with an `x`)
```
- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
>Following Option2 - Develop in your own environment.
In Step 2 - provision.py script is erroring. Here is the error: TypeError: WorkspaceConnectionsOperations.create_or_update() missing 1 required positional argument: 'workspace_connection'

FYI - provision.yaml file is updated with all the required values.

### Any log messages given by the failure
>Class WorkspaceConnection: This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.
ActivityCompleted: Activity=WorkspaceConnections.CreateOrUpdate, HowEnded=Failure, Duration=0.0 [ms], Exception=TypeError, ErrorCategory=Unknown, ErrorMessage=Got error TypeError: 'WorkspaceConnectionsOperations.create_or_update() missing 1 required positional argument: 'workspace_connection'' while calling WorkspaceConnections.CreateOrUpdate
Traceback (most recent call last):
File "C:\Users\paramasivams\OneDrive - Microsoft\Documents\GitHub\rag-data-openai-python-promptflow\src\provisioning\provision.py", line 855, in
main()
File "C:\Users\paramasivams\OneDrive - Microsoft\Documents\GitHub\rag-data-openai-python-promptflow\src\provisioning\provision.py", line 843, in main
provision_plan.provision()
File "C:\Users\paramasivams\OneDrive - Microsoft\Documents\GitHub\rag-data-openai-python-promptflow\src\provisioning\provision.py", line 578, in provision
self.steps[k].create()
File "C:\Users\paramasivams\OneDrive - Microsoft\Documents\GitHub\rag-data-openai-python-promptflow\src\provisioning\provision.py", line 502, in create
return ml_client.connections.create_or_update(connection=connection_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\paramasivams\OneDrive - Microsoft\Documents\GitHub\rag-data-openai-python-promptflow\.venv\Lib\site-packages\azure\ai\ml\_telemetry\activity.py", line 292, in wrapper
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
TypeError: WorkspaceConnectionsOperations.create_or_update() missing 1 required positional argument: 'workspace_connection'

### Expected/desired behavior
>provision.py script executing successfully

### OS and Version?
> Windows 10.

### Versions
>

### Mention any other details that might be useful

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/provisioning/provision.py, especially the create method at line 502, and inspect how provision.yaml is passed into the workspace connection operation. Reproduce the Option 2 local setup by running provision.py, then verify the script completes without the reported missing-argument TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.