My list has 130 sentences in Croatian and a bit above 6,000 characters. I call the script with src_lang='hr' and dest_lang='en'.
Expected behavior
The list of translations.
Actual behviour
When I do it manually in the python interpreter, I get the list of translations. However, when this function is run in my script (called as a cron job), I get the following in my log, 70 times:
The 200 at the end means the request was a success (on the level of http/s), but I get an exception, not the translations. If the API accept it or not, that I don't know.
Desktop (please complete the following information):
Describe the bug No translations returned when the request is sent from a script run as a cron job.
To Reproduce I have a list of sentences, created dynamically, like:
list_of_strings = ['This is one sentence.', 'This is another sentence.', 'etc.']
which I send to Google with function such:
My list has 130 sentences in Croatian and a bit above 6,000 characters. I call the script with
src_lang='hr'
anddest_lang='en'
.Expected behavior The list of translations.
Actual behviour When I do it manually in the python interpreter, I get the list of translations. However, when this function is run in my script (called as a cron job), I get the following in my log, 70 times:
I get the above 70 times, and then an exception.
The 200 at the end means the request was a success (on the level of http/s), but I get an exception, not the translations. If the API accept it or not, that I don't know.
Desktop (please complete the following information):