Repository navigation
CustomVision - create_project throws AttributeError: 'str' object has no attribute 'signed_session' #11503
Description
Activity
- ghost addedneeds-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.Workflow: This is a new issue that needs to be triaged to the appropriate team.
on May 18, 2020 - addedClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.
on May 18, 2020 - ghost removedneeds-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.Workflow: This is a new issue that needs to be triaged to the appropriate team.
on May 18, 2020 - addedbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.
on May 18, 2020 Hi Mick Vleeshouwer (@iMicknl)
I agree documentation should be updated. That being said, what you described is not a breaking change, this SDK required since day 1ApiKeyCredentialsas credentials type (we can see it already in the outdated samples you mention).Could you rename your issue to be more accurate, about updating samples and documentations?
Thanks!
Laurent Mazuel (@lmazuel) Thanks! I am not sure if I fully understand what you mean. The
ApiKeyCredentialsis not mentioned in the two samples I mention, I have added the specific samples below again.Does this mean that both examples are not using the correct approach? Or is this a breaking change after all? :-)
MicrosoftDocs/azure-docs@c26516c#diff-312534b6d704c284180ce766e44e90a9
Andrew (@areddish) I'm confused here how you got a sample working before by just passing a string, autorest would never have supported that? Was it manually written?
Edit: Ok, I see the parameter was described as a generic header in the Swagger. That helps connect the dot :)
Mick Vleeshouwer (@iMicknl) I get what happen now, sorry for my initial answer. There is a pattern to follow that custom vision was not following, and
ApiKeyCredentialsis the correct way to go.I assign this issue to Andrew (@areddish) who will handle the samples as necessary, thanks for the report!
Reacted by Mick Vleeshouwer@lamazuel Yes, this release aligns us with the other SDK's using ApiKeyCredentials. I've updated the documentation, but looks like I missed a sample. Will do that now.
Reacted by Laurent MazuelThanks Laurent Mazuel (@lmazuel) & Andrew (@areddish)! Great that all SDK's are aligned now, makes sense :).
Would it be wise to note this as a breaking change on PyPi? This will help users of the <2.0.0 package. Especially since other (faulty) breaking changes are mentioned there, which is confusing. (#11504)
Mick Vleeshouwer (@iMicknl) does #11827 look ok?
Laurent Mazuel (@lmazuel) looks good to me!
Reacted by Laurent Mazuel- added and removed
on Jun 24, 2020 This is still an issue. Why was it closed?
- locked and limited conversation to collaborators
on Apr 12, 2023
Describe the bug
Creating a project via
create_projectdoes throw aAttributeError: 'str' object has no attribute 'signed_session'. This is solved when calling theCustomVisionTrainingClientwithApiKeyCredentials, however this is not documented as a breaking change on PyPi.To Reproduce
Steps to reproduce the behavior:
throws
AttributeError: 'str' object has no attribute 'signed_sessionAdditional 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