Azure / Azure/azure-sdk-for-python
ServiceFabricClientAPIs unable to run due to missing keyword argument
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
- **Package Name**: azure.servicefabric / ServiceFabricClientAPIs
- **Package Version**: 8.2.0.0
- **Operating System**: MacOS
- **Python Version**: 3.10
**Describe the bug**
To get the past the error [here](https://github.com/Azure/azure-sdk-for-python/issues/38169), we can utilize the [cred_wrapper from here](https://stackoverflow.com/questions/63384092/exception-attributeerror-defaultazurecredential-object-has-no-attribute-sig) so that we can authenticate to the cluster with `ServiceFabricClientAPIs` however, we then get the error of: `FabricError.__init__() missing 1 required keyword-only argument: 'error'` whenever we execute a command. However, according to [documentation](https://learn.microsoft.com/en-us/python/api/azure-servicefabric/azure.servicefabric.servicefabricclientapis?view=azure-python#azure-servicefabric-servicefabricclientapis-get-application-info-list) error is not required.
**To Reproduce**
Set up Requirements (including a cred_wrapper.py from the link above)
`pip3 install azure-servicefabric azure-identity`
Code Example to run into error:
```
from azure.servicefabric import ServiceFabricClientAPIs
from cred_wrapper import CredentialWrapper
cluster_url = "https://CLUSTER_URL:19080"
# Initialize the credentials
credential = CredentialWrapper()
#Initialize the client
sf_client = ServiceFabricClientAPIs(
credentials=credential,
base_url=cluster_url
)
#Execute a command
apps = sf_client.get_application_info_list()
```
**Expected behavior**
An Iterator of Service Fabric Applications are returned.
**Screenshots**
N/A
**Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.