Skip to content
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

Polly's put_lexicon() example does not work #4290

Closed
kumatheworld opened this issue Oct 1, 2024 · 3 comments · Fixed by boto/botocore#3300
Closed

Polly's put_lexicon() example does not work #4290

kumatheworld opened this issue Oct 1, 2024 · 3 comments · Fixed by boto/botocore#3300
Assignees
Labels
documentation This is a problem with documentation. p3 This is a minor priority issue polly service-api This issue is caused by the service API, not the SDK implementation.

Comments

@kumatheworld
Copy link

Describe the issue

The following example in the documentation does not work as it specifies the file path as Content:

response = client.put_lexicon(
    Content='file://example.pls',
    Name='W3C',
)

Instead, the file content should be specified as written in the documentation:

with open("example.pls") as file:
    content = file.read()

client.put_lexicon(Name="W3C", Content=content)

Links

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/polly/client/put_lexicon.html

@kumatheworld kumatheworld added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Oct 1, 2024
@RyanFitzSimmonsAK RyanFitzSimmonsAK self-assigned this Oct 2, 2024
@RyanFitzSimmonsAK RyanFitzSimmonsAK added investigating This issue is being investigated and/or work is in progress to resolve the issue. p3 This is a minor priority issue polly and removed needs-triage This issue or PR still needs to be triaged. labels Oct 2, 2024
@RyanFitzSimmonsAK
Copy link
Contributor

RyanFitzSimmonsAK commented Oct 2, 2024

Hi @kumatheworld, thanks for reaching out. You're correct that this example is flawed; it uses AWS CLI-specific formatting, and should instead reflect that Content accepts a string, not a file. However, because this documentation is generated from the model file for multiple SDKs, we can't use the Python-specific example from the user guide. I've reached out to the service team to address this issue, and will let you know when I have any updates.

Ticket # for internal use : P159140618

@RyanFitzSimmonsAK RyanFitzSimmonsAK removed the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Oct 2, 2024
@RyanFitzSimmonsAK RyanFitzSimmonsAK added the service-api This issue is caused by the service API, not the SDK implementation. label Nov 5, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

@RyanFitzSimmonsAK
Copy link
Contributor

The service team made a change to the model file to reflect this, and the Boto3 team made a PR to adjust this example. Thanks for raising this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. p3 This is a minor priority issue polly service-api This issue is caused by the service API, not the SDK implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants