Azure / Azure/azure-sdk-for-python

ServiceFabricClientAPIs unable to run due to missing keyword argument

Open
#38,171 1 comment 0 reactions 0 assignees View on GitHub
Client customer-reported needs-team-attention question Service Attention Service Fabric
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.