-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
unexpected token <, "<html <h..." is not valid JSON
error message when translating long text
#65
Comments
That's interesting behaviour, could you share which service is giving this issue? I've tested this out with a couple (DeepL, Google Translate, Azure) and was not able to reproduce this issue with the lorem ipsum. |
NO worries, take your time. It's by no means mission-critical. I am pretty sure it is a problem with size of the text being translated, so I can just use shorter texts. I forgot to mention I am getting message with both lingva using lingva.ml and lingva.lunar.icu and libre translate using http://translate.terraprint.co I don't have call to use other services, so I haven't tested them... Having there be a limit is not so much of a problem, but the cryptic error message might be nice to fix... |
Thank you for reporting the bug! This was basically caused by two different mistakes:
With the more strict splitting, you may notice that the output of long texts isn't as clean (the splitting currently happens at the first available whitespace). EDIT: Release with fix coming soon! |
Thanks! Seem to be working fine now! Great job sussing it out... |
Working like a charm. THX!! |
If I try to translate along text, such as Japanese Lorem Ipsum given below I get a message like
unexpected token <, "<html <h..." is not valid JSON
I tried cutting this down by removing one paragraph at a time from the bottom, and eventually got the message. But, interestingly, if tried from the top (i..e. including the paragraphs previously causing the error) the error did NOT appear, and it worked. This makes me think it is the length, not the content of the message that is causing the error.
Below is Japanese Lorem Ipsum (not the text I originally used, but this also throws the error)
The text was updated successfully, but these errors were encountered: