Language Translator app is throwing up an error regarding JSONDecode

Hello all,

A few days ago, I deployed a Language Translator app.
The Language Translator app was going fine those days. When I checked this morning, It is showing a json.JSONDecode error.


json.decoder.JSONDecodeError: Extra data: line 1 column 798 (char 797)
Uncaught app exception
Traceback (most recent call last):
File “/home/appuser/venv/lib/python3.7/site-packages/streamlit/”, line 338, in _run_script
exec(code, module.dict)
File “/app/languagetranslator/”, line 35, in
translate = translator.translate(text,lang_src=value1,lang_tgt=value2)
File “/home/appuser/venv/lib/python3.7/site-packages/google_trans_new/”, line 188, in translate
raise e
File “/home/appuser/venv/lib/python3.7/site-packages/google_trans_new/”, line 152, in translate
response = json.loads(response)
File “/usr/local/lib/python3.7/json/”, line 348, in loads
return _default_decoder.decode(s)
File “/usr/local/lib/python3.7/json/”, line 340, in decode
raise JSONDecodeError(“Extra data”, s, end)

Github repo: GitHub - HarisankarSNair/LanguageTranslator: A web app for translating from one language to another.Almost all languages are available.App also generates an audio file of the translation and lets you download the audio file.

Live App:

I don’t know why this JSON error is being shown up suddenly.
Can anyone help me solve this problem?
Any help will be much appreciated.


Hey @HarisankarSNair,

Were you able to figure this out? It seems your app is up now and not displaying that JSON error.

Happy Streamlit-ing!

1 Like

Hi all,

It is coming from a JSON issue at I fixed at my local by making some changes at this file. For further information to fix at your local you may read this article. Its working properly on local: Python google-trans-new translate raises error: JSONDecodeError: Extra data: - Stack Overflow

But I could not find a way to work this on Streamlit host. Could somebody fix this issue?

Kind Regards,

1 Like

Hi @ekimdusu

Thank you for your reply. I will surely look into this.
Can you share a snippet of the code where you made changes?

I have also created a GitHub issue in my repo mentioning the same -Translating gives error · Issue #1 · HarisankarSNair/LanguageTranslator · GitHub


1 Like

Hi @HarisankarSNair, were you able to resolve it in Streamlit?
I am getting the JSONDecodeError


Hi @Tulasi_Agina,

I can’t help you as it seems that your github repo and app are private. If you can allow me access to them I can take a look and see if I can help find the error.

Happy Streamlit-ing!