return ERROR string on some translation
See original GitHub issueHi ! Thank you for your great work, I can’t deny the fact that this is so useful on the project I am trying on 😃 I highly recommend this work of yours.
I just have encounter this return ERROR string, I hope to resolve or pin point what might be wrong while translating the text
I’m actually running 38K+ translation in 4 threads’
google_translator(timeout=10,proxies={'http':'159.203.61.169:8080'})
lang_src='zh' to lang_tgt='en'
text: 這是……<size=24>欸欸欸——??</size>\n難道你想和我<color=#CA2E0AFF>在噴泉前留下紀念照</color>嗎?這主意太棒了,如此就能帶走最喜愛的風景了!我先去噴泉前面等你~快,快!
result : ERROR
EDIT:
Upon checking I think it’s the \n that cause the error.
work around : just put some wrapper in it to be able to pass the translation
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Why is str.translate() returning an error and how can I fix it?
Show activity on this post. the error message is TypeError: translate() takes exactly one argument (2 given) . How can I format this...
Read more >Get a translate error string response - Akamai TechDocs
Returns the status of the asynchronous Translate error string request. For operations with the SUCCESS status, the response includes also details about the ......
Read more >Return and handle an error - The Go Programming Language
Add an if statement to check for an invalid request (an empty string where the name should be) and return an error if...
Read more >Error Handling - A Gentle Introduction to Rust
Error handling in Rust can be clumsy if you can't use the question-mark operator. To achieve happiness, we need to return a Result...
Read more >Recoverable Errors with Result - The Rust Programming ...
The type of E used in the error value is std::io::Error . This return type means the call to File::open might succeed and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for you question. I try use your text . But i don’t get error.
-> This is… <size=24> Hey Hey–? ? Do you want to <color=#CA2E0AFF> with me to leave a souvenir photo in front of the fountain? This is a great idea, so you can take away your favorite scenery! I’ll wait for you in front of the fountain~ Quick, quick!
Can you tell the detail for your error?
@lushan88a Yep, I just installed it like yesterday, so it’s 1.1.1. My code is exactly as you posted. Nothing different, and the lang codes are valid. So debugging ‘[[“wrb.fr”,“MkEWBc”,null,null,null,[13],]’ is constructed and called on that first json that it errors on. If you add another bracket at the end and then you escape out the double quotes it works. I can’t figure out to replace those double quotes because it turns them into double backslash double quotes, but testing with a static string with it manually escaped out proved working in my tests.