You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
31278: Error: org.omegat.util.HttpConnectionUtils$ResponseError: 400: BAD REQUEST
31278: Error: at org.omegat.util.HttpConnectionUtils.getStringContent(HttpConnectionUtils.java:396)
31278: Error: at org.omegat.util.HttpConnectionUtils.getStringContent(HttpConnectionUtils.java:388)
31278: Error: at org.omegat.util.HttpConnectionUtils.post(HttpConnectionUtils.java:324)
31278: Error: at org.omegat.machinetranslators.libretranslate.LibreTranslate.translate(LibreTranslate.java:114)
31278: Error: at org.omegat.core.machinetranslators.BaseCachedTranslate.getTranslation(BaseCachedTranslate.java:118)
31278: Error: at org.omegat.gui.exttrans.MachineTranslateTextArea$FindThread.getTranslation(MachineTranslateTextArea.java:275)
31278: Error: at org.omegat.gui.exttrans.MachineTranslateTextArea$FindThread.search(MachineTranslateTextArea.java:258)
31278: Error: at org.omegat.gui.exttrans.MachineTranslateTextArea$FindThread.search(MachineTranslateTextArea.java:233)
31278: Error: at org.omegat.gui.common.EntryInfoSearchThread.run(EntryInfoSearchThread.java:96)
tested in ubuntu 22.04 & windows 10
The text was updated successfully, but these errors were encountered:
I solved it changing http request, removing headers parameter it work, for some reason that function is not working properly:
String v = HttpConnectionUtils.post(serverUrl, params);
Well, I hope work on it for activate API-KEY and alternatives translates.
I tried to connect with local or online libretranslate but allways is empty.
When i do directly on webbroser it work:
curl -X 'POST'
'http://127.0.0.1:5000/translate'
-H 'accept: application/json'
-H 'Content-Type: application/x-www-form-urlencoded'
-d 'q=hola&source=es&target=en&format=text&alternatives=3'
Request URL: http://127.0.0.1:5000/translate
Server response: Code 200
{
"alternatives": [
"hi",
"hello",
"hey"
],
"translatedText": "hello"
}
Response headers
access-control-allow-credentials: true access-control-allow-headers: Authorization,Content-Type access-control-allow-methods: GET,POST access-control-allow-origin: * access-control-expose-headers: Authorization access-control-max-age: 1728000 content-length: 63 content-type: application/json date: Mon,15 Jul 2024 10:07:11 GMT server: waitress
This is what OmegaT log:
31278: Error: org.omegat.util.HttpConnectionUtils$ResponseError: 400: BAD REQUEST
31278: Error: at org.omegat.util.HttpConnectionUtils.getStringContent(HttpConnectionUtils.java:396)
31278: Error: at org.omegat.util.HttpConnectionUtils.getStringContent(HttpConnectionUtils.java:388)
31278: Error: at org.omegat.util.HttpConnectionUtils.post(HttpConnectionUtils.java:324)
31278: Error: at org.omegat.machinetranslators.libretranslate.LibreTranslate.translate(LibreTranslate.java:114)
31278: Error: at org.omegat.core.machinetranslators.BaseCachedTranslate.getTranslation(BaseCachedTranslate.java:118)
31278: Error: at org.omegat.gui.exttrans.MachineTranslateTextArea$FindThread.getTranslation(MachineTranslateTextArea.java:275)
31278: Error: at org.omegat.gui.exttrans.MachineTranslateTextArea$FindThread.search(MachineTranslateTextArea.java:258)
31278: Error: at org.omegat.gui.exttrans.MachineTranslateTextArea$FindThread.search(MachineTranslateTextArea.java:233)
31278: Error: at org.omegat.gui.common.EntryInfoSearchThread.run(EntryInfoSearchThread.java:96)
tested in ubuntu 22.04 & windows 10
The text was updated successfully, but these errors were encountered: