It seems i cannot hand over my text (pulled from a mssql database) in the deepls request. It alway ends up with the error: raise ValueError("text must not be empty") ValueError: text must not be empty
How to fix this? reading a variable works:
mytextvar = "Hallo Guten Tag"
result = translator.translate_text(mytextvar,target_lang="EN-US")
but as soon as the string in the var iscoming from my mssql query, it will fail:
query = ("SELECT sometextstring, moretext FROM tablexy ")
data = cursor.execute(query)
for i in data:
text = (i[1])
result = translator.translate_text(text,target_lang="EN-US")
print(result)
I can even check type and get string for the text var after loading it with the value from (i[1])
So what am I missing here?
Basically i want to go through my table, read the text and translate it, then write it back...