-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoSuchTagSet when calling the GetBucketTagging operation #341
Comments
Yeah that's strange. This is an error response coming from the S3. Most services though do not throw an error though if the list is empty, they just return an empty list. We may have to add a customization here based on S3's behavior, but we still need to do more research on what the right approach will be. |
Yep, I've googled up this in ruby sdk, which raised my eyebrows. On one hand 404 is a deviant, but sort of makes sense (when out of context), but in boto it's definitely an outsider. |
Yeah I tried out the other SDKs that use resources like the ruby sdk and they have the same issue as boto so we will need to figure what the story will be: 2.2.3 :001 > require 'aws-sdk'
=> true
2.2.3 :003 > s3 = Aws::S3::Resource.new(region:'us-east-1')
=> #<Aws::S3::Resource>
2.2.3 :005 > bucket = s3.bucket('mybucketfoo')
=> #<Aws::S3::Bucket name="mybucketfoo">
2.2.3 :006 > tagging = bucket.tagging()
=> #<Aws::S3::BucketTagging bucket_name="mybucketfoo">
2.2.3 :007 > tagging.tag_set
Aws::S3::Errors::NoSuchTagSet: The TagSet does not exist I think returning an empty list should be the behavior. |
👍 to that. |
+1 Just hit this issue myself. will try / catch for now |
After research, it seems there is not much can be done here to change the behavior.
In short, just use try / except to catch that error. |
Can we clarify whether we are taking about clients or resources? The original traceback didn't suggest resources, but @kyleknap's comments are using resources. I agree that we shouldn't change the low level client API, but I still think at a high level, we should try to improve what we have in the resource model, especially if it's something we can model with some changes to the resource spec. I definitely understand the customer request to succinctly get a set of tags, modify them, and update the bucket with the new tags. I'm in favor of making that easier to do at the resource level. |
So to document the off-line conversation.
|
We can now retrieve S3.bucket tag list. A change was needed to handle the return of the S3 API when there is no tag - See boto/boto3#341
We can now retrieve S3.bucket tag list. A change was needed to handle the return of the S3 API when there is no tag - See boto/boto3#341
+1 |
Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one. |
I have a bucket without any tags which results in the error when trying to list them.
I'd expect it to return just an empty tag set like most other methods do.
The text was updated successfully, but these errors were encountered: