Skip to content

CustomVision - create_project throws AttributeError: 'str' object has no attribute 'signed_session' #11503

Closed
Azure-Samples/cognitive-services-python-sdk-samples
#89
@iMicknl

Description

@iMicknl
  • 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

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Cognitive - Custom VisionService AttentionWorkflow: This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions