Description
- Package Name: Custom Vision
- Package Version: 2.0.0
- Operating System: Linux
- Python Version: 3.6
Describe the bug
Creating a project via create_project
does throw a AttributeError: 'str' object has no attribute 'signed_session'
. This is solved when calling the CustomVisionTrainingClient
with ApiKeyCredentials
, however this is not documented as a breaking change on PyPi.
To Reproduce
Steps to reproduce the behavior:
from azure.cognitiveservices.vision.customvision.training import CustomVisionTrainingClient
ENDPOINT = "https://westeurope.api.cognitive.microsoft.com/" # your API endpoint
key = "" # Replace with a valid key
trainer = CustomVisionTrainingClient(credentials=key, endpoint=ENDPOINT)
project = trainer.create_project("FormRecognizerVisionClassification")
throws
AttributeError: 'str' object has no attribute 'signed_session
Additional context
It would be great if there were any samples updated after the 2.0.0 release. I did waste a lot of time by going through the SDK source files.
Outdated content:
https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/quickstarts/image-classification?pivots=programming-language-python
https://github.com/Azure-Samples/cognitive-services-python-sdk-samples/tree/master/samples/vision