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
Translate: BadRequest: "Too many text segments" #5425
Comments
|
@randomcanary Thanks for the report. As far as I can see, the translate API quota docs don't show a per-request limit for number of charaters / segments. As a workaround, you could try breaking the list of segments up into smaller chunks. @theacodes Who is our PoC for translate API backend issues? |
|
/cc @beccasaurus |
|
what's the default quota for translation api. try it yourself,Are U kidding me? |
|
100 at a time works for me. HTH |
|
I am seeing the same problem in C# too. May be related to: The problem IMO is that the limits seem arbitrary and it makes for junky and/or inefficient end code. |
|
I did some investigating and you can send up to 128 segments. There are also limitations on the number of overall characters, but that is well documented on failure.
I have requested that the error for too many segments informs you of how many segments are allowed. |
|
For reference, internal issue b/145825761 |
Code example:
Error obtained:
BadRequest: 400 POST https://translation.googleapis.com/language/translate/v2: Too many text segmentsInput: Python list of strings totaling up 819 characters.
The text was updated successfully, but these errors were encountered: