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

Open
kumatheworld opened this issue Oct 1, 2024 · 1 comment
Open

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

kumatheworld opened this issue Oct 1, 2024 · 1 comment
Assignees
Labels
documentation This is a problem with documentation. p3 This is a minor priority issue polly

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
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
Projects
None yet
Development

No branches or pull requests

2 participants