Skip to content
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

When translate long text. The version 2.0.0 give SyntaxError: Unexpected token '<', \"<html lang\"... is not valid JSON #43

Closed
thawon opened this issue Nov 12, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@thawon
Copy link

thawon commented Nov 12, 2022

Hi there,

The version 2.0.0 errors out when trying to translate long text. The error is the following:
"SyntaxError: Unexpected token '<', "<html lang"... is not valid JSON"

The length of the text varies. On some English texts, it can translate up to 1380 characters but another error out at about 1200 characters. The error also happens in another language. For example: Chinese (zh-CN) errors out at 400 characters.
(If you need me to give you the text I used to test this. I will be more than happy to. Because posting it here will be really unattractively long.)

Note: I've tried the same texts with the previous version (1.1.2) and it works just fine. So I guess the error has not got anything to do with the Google Translation Service.

Many thanks :D

@iamtraction
Copy link
Owner

Can you give the texts that worked in earlier versions but is failing now?

@iamtraction iamtraction added the bug Something isn't working label Nov 14, 2022
@iamtraction
Copy link
Owner

Related #42

@iamtraction
Copy link
Owner

Fixed in v2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants