Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
0 votes
0 answers
87 views

get transliterated text Except translated text

Whenever I Used googletrans API to convert my English text to any Indian language like Gujrati, what happens is that, it gives me translated text except converted text. I'll give you an example like, ...
Vijay Bokade's user avatar
0 votes
0 answers
470 views

Auto-translate using Python

I'm doing an auto-translation script to convert all the data (mixed language) in my Excel file. My file is composed of 3000-4000 raw data with mixed language and I want to translate all the data to &...
user23367378's user avatar
0 votes
1 answer
48 views

How to keep UTF8 encoding during xml parse, attribute value change and file writing? (python)

I'm writing a programm in Python, my goal is to : read input xml file one line at a time for each line find "CH" attribute change attribute value : translate from french to portugese write ...
JB B's user avatar
  • 11
0 votes
0 answers
112 views

How to use googletrans to translate text attributes in xml parsed file in python?

I have a xml file with loads of lines containing this kind of elements: <?xml version="1.0" encoding="UTF-8"?> <PAGEOBJECT XPOS="553.544307086578" YPOS="...
JB B's user avatar
  • 11
0 votes
1 answer
1k views

How can I fix Openai and googletrans dependency error

googletrans 4.0.0rc1 requires httpx==0.13.3, but you have httpx 0.26.0 which is incompatible. openai 1.8.0 requires httpx<1,>=0.23.0, but you have httpx 0.13.3 which is incompatible. I am trying ...
Bad Gamer's user avatar
0 votes
1 answer
544 views

ModuleNotFoundError: No module named 'googletrans', but I did download it

I'm trying to test out googletrans every time I try to run the file I get this error message: from googletrans import Translator ModuleNotFoundError: No module named 'googletrans'. I have tried ...
Karem636's user avatar
1 vote
2 answers
112 views

Python module "googletrans" not working in windows system

I have written a python code that translates languages from tge following input types: text, inage and audio. I am using the googletrans api for translating but it is giving htis error on running : '...
Deepak's user avatar
  • 11
0 votes
1 answer
238 views

Googletrans not working with large datasets

I'm trying to translate a column of a Dataframe of shape (13815, 2), that are English sentences. I want to translate them to Persian('fa'). but since the size of the data is too much, every time I try ...
Majid wasiqi's user avatar
1 vote
3 answers
3k views

How to resolve "TypeError: the JSON object must be str, bytes or bytearray, not NoneType" error, while working on translating with googletrans?

How can I resolve TypeError while translating with googletrans? TypeError occurs on 'result = translator.translate(messages[i], dest='en')', and I can't understand because type of result is '...
Scarlet's user avatar
  • 75
0 votes
0 answers
441 views

Google Translate module randomly throws "the JSON object must be str, bytes or bytearray, not NoneType"

I use Google Translate in Python and found this bug in my code. I copy here a minimal reproducible example: import time from googletrans import Translator as google_Translator class Translator: ...
ginjaemocoes's user avatar
  • 4,652
0 votes
2 answers
875 views

Translating the whole dataframe with googletrans is taking too long

I'm trying to translate all the elements of a dataframe from Persian to English. I'm using the code below, but it takes long time to run. Is there any quick way? import pandas as pd exl_file = 'data....
Reza Bahmani's user avatar
0 votes
0 answers
75 views

AttributeError: 'NoneType' object has no attribute 'group' googletrans

I'm trying to translate the values of certain dataframe rows. The criteria is the language of the value. the column contains both English and French text. I want to translate the English text to ...
Moe_blg's user avatar
  • 121
1 vote
1 answer
2k views

Google Cloud Translate vs Python googletrans

I have been thinking about developing a new product which has to be capable of translating text to several different languages. While I was doing my research, I have found the Python library named &...
codeine's user avatar
  • 80
0 votes
1 answer
312 views

getting error as Exception in Tkinter callback and Attribute Error: 'NoneType' Object has no attribute 'group'

I am trying to create a translator with help of Tkinter and googletrans library but getting following error and I am confuse as I am not sure is this error due to library or a mistake from my side. ...
Tanvi's user avatar
  • 1
1 vote
0 answers
130 views

translating text from English into Hindi return translatex000

I have a problem when i am using googletrans as a library with my data frame. its not showing a translated course-title in Hindi and im trying to translate from English to Hindi and currently its not ...
teddy107 Van Weit's user avatar
0 votes
1 answer
1k views

the JSON object must be str, bytes or bytearray, not NoneType

This program takes html file from input directory and translate it to hindi using googletrans. import os from bs4 import BeautifulSoup from googletrans import Translator # Set the input and output ...
CartoonSavage32's user avatar
-2 votes
2 answers
405 views

Translating comments using google translate api python

I am trying to translate malay comments to english. import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import re from bs4 import BeautifulSoup from nltk.stem....
Sabx2x1x's user avatar
1 vote
3 answers
749 views

How to set up Translator from googletrans library?

I am trying to parse, translate and save XML file. I am stuck with setting up translator from googletrans library in Python (probably). Here is my code: import xml.etree.ElementTree as ET from ...
BrutusMartinus's user avatar
0 votes
0 answers
270 views

Translate a column with English and Dutch text to only English using GoogleTrans

I have a data frame with tweets and I want to translate it to only English. The problem is that the source column has both English and Dutch tweets. I used the following code to try to translate this ...
Hans.nl's user avatar
  • 65
0 votes
1 answer
474 views

Error using googletrans api in python translate() missing 1 required positional argument: 'self'

I want to translate some text using googletrans. This is my code: inputtext = "Ich mag Schokolade" srclang = "de" dstlang = "en" translation = Translator.translate(text=...
Daniel Lehmann's user avatar
3 votes
1 answer
8k views

httpcore._exceptions.ReadTimeout: The read operation timed out | python googletrans library

I'm using Translator from the python library googletrans. I used it well for over 2 months now but somehow, today I received the "httpcore._exceptions.ReadTimeout: The read operation timed out ...
SuzukuMiyota's user avatar
0 votes
2 answers
2k views

AttributeError: 'str' object has no attribute 'request' - googletrans

I am trying to use this google translate python library googletrans 3.0.0, which I installed from pypi. I used this code to start with: from googletrans import Translator proxies = {'http': 'http://...
Betty's user avatar
  • 268
2 votes
1 answer
6k views

TypeError: the JSON object must be str, bytes or bytearray, not NoneType (while Using googletrans API)

I'm trying to translate a yml file using the googletrans API. This is my code: #Import from googletrans import Translator import re # API translator = Translator() # Counter counter_DoNotTranslate = ...
Andre Bormans's user avatar
1 vote
2 answers
1k views

googletrans error with dictionary translate

Trying to use googletrans in my project, using version 4.0.0-rc.1, Python 13.10 on Windows 10 local machine. The script is simple, it must translate an array of the phrases into English from Russian. ...
twistfire's user avatar
  • 496
1 vote
0 answers
427 views

Googletrans AttributeError: 'NoneType' object has no attribute 'group'

I installed googletrans with following command because other versions aren't working properly. pip install googletrans==4.0.0-rc1 I guess this is using old api or something like that because it is ...
Yusuf Can İlbeyli's user avatar
2 votes
2 answers
11k views

Python googletrans module not translating

I am using the googletrans module to try and translate between languages as per the below. import time from googletrans import Translator translator = Translator() translate_channel = translator....
gdogg371's user avatar
  • 4,190
2 votes
1 answer
591 views

Exception in Tkinter callback and googletrans api

I'm trying to write a code for a translation app using python and googletrans API, the code looks fine but there seems to be errors in the tkinter and googletrans libraries. I'll show the code and ...
MD SAFWATHULLAH SAFI ANSARI 's user avatar
0 votes
1 answer
3k views

Googletrans not detecting language

Good morning everyone, I am using googleTrans in my code to translate a list of sentence. It worked perfectly until today. Now when I run it, it perceive everything as English and then not making any ...
Claire S's user avatar
2 votes
1 answer
2k views

Python - Googletrans for multiple txt files in loop

I'm seeking to run googletrans to translate a series of 300 .txt files in a single folder. I'm struggling to construct a loop that will allow me to run a translation of each file and write the output ...
Daniel Hutchinson's user avatar
0 votes
1 answer
3k views

Googletrans Error- The handshake operation timed out

When I try to translate text using the googletrans module, I get an error: httpcore._exceptions.ConnectTimeout: _ssl.c:1106: The handshake operation timed out Here's my code: from tkinter import * ...
Lenovo 360's user avatar
4 votes
2 answers
5k views

Python (googletrans) - AttributeError: 'NoneType' object has no attribute 'group'

Trying to detect language code in Python using googletrans. But it generating ERROR (Refer error block for info). Require solution for the same Code : import googletrans from googletrans import ...
K Ashish's user avatar
  • 143
-1 votes
1 answer
1k views

using googletrans to translate spanish to english

I am trying to use googletrans to translate some Spanish text to English. I am following the examples & below is my code. from googletrans import Translator translator = Translator() txt = ...
mHelpMe's user avatar
  • 6,738
0 votes
2 answers
334 views

problems with googletrans module

im trying to make a small graphic translator in python using googletrans. It runs fine until I press the translate button this is the error message I get Exception in Tkinter callback Traceback (most ...
Lenue001's user avatar
2 votes
1 answer
3k views

googletrans stopped working with detecting all languages as English

The problem I have here is googletrans API suddenly stopped working, just like this: result = translator.translate('祝您新年快乐', src='zh-cn', dest='en') result.text Output: '祝您新年快乐' It should return ...
Xuyang Han's user avatar
3 votes
2 answers
6k views

AttributeError: 'NoneType' object has no attribute 'group' googletrans python

Windows 7 Python 3.8.2 googletrans 3.0.0 from googletrans import Translator text = 'hello' translator = Translator() result = translator.translate(text).src Traceback (most recent call last): File ...
Акмаль's user avatar
4 votes
3 answers
4k views

Googletrans API AttributeError

I keep getting "AttributeError: 'NoneType' object has no attribute 'group' " error even after changing gtoken on googletrans stopped working with error 'NoneType' object has no ...
Fahmi's user avatar
  • 115
0 votes
0 answers
589 views

Discord.py: googletrans command suddenly stopped working

I'm making a discord.py bot and I'm trying to make some commands with the googletrans module for translation. My code was running just fine last night but when I tried it this morning, the language ...
Whatsdeproblem's user avatar
0 votes
0 answers
592 views

googletrans - Getting output same as input

I am trying to translate from AWS EC2 Instance with googletrans python library using below snippet: translator = Translator(service_urls=['translate.google.com', 'translate.google.co.kr']) ...
Mohamed Niyaz's user avatar
4 votes
2 answers
9k views

Python: Cannot install googletrans

I try to install googletrans https://pypi.org/project/googletrans/ by running this command as adviced: $ pip install googletrans but I always get same error both at python 3.5 and python 2.7: ...
Dmitriy Grishin - dogrishin's user avatar
0 votes
2 answers
4k views

Googletrans API Error 'NoneType' object has no attribute 'group'

I use googletrans API every day, but unfortunately, I got this error code today. Is google updating the API? Please help me with this problem. ~\AppData\Local\Programs\Python\Python38-32\lib\site-...
YS KANG's user avatar
  • 11
0 votes
1 answer
388 views

Python googletrans returns only one word

I make a translator app using tkinter and googletrans but when i run it, the googletrans only return 1 word here is my full code (main.py) #Importing modules from tkinter import * from googletrans ...
Aryasatya's user avatar
2 votes
3 answers
14k views

GoogleTrans Python not translating

I am using GoogleTrans for my project. Actually I have a text in Marathi which I got from "speech to text" but when I am converting that text into English it is not translating properLY. But ...
user9294732's user avatar
0 votes
1 answer
787 views

Stuck with error while installing googletrans

When i was trying to install googletrans using pip install googletrans i get the error in cmd. I am using python 3.6 32bit error:- error: Microsoft Visual C++ 14.0 is required. Get it with &...
code by Abhishek Bharti's user avatar
1 vote
1 answer
2k views

ModuleNotFoundError: No module named 'googletrans'

the code (from googletrans import Translator) brings up the following error: Traceback (most recent call last): File "/Users/cadeylange/Documents/python_work/Personal/frequently_used_words.py", ...
Cadey's user avatar
  • 11
0 votes
1 answer
641 views

I get a syntax error when trying to translate into broken english using Googletrans API (Python 3.8.1)? [closed]

This is very much a dumb thing to ask, however I'm new to Python. I just installed googletrans from PyPI and I wanted to make a program that runs a phrase through a set of translations to make the ...
alemci's user avatar
  • 9
-2 votes
1 answer
1k views

googletrans doesn't translate the numbers

The translator works fine for the phrases and word but doesn't convert the English numbers into other languages if I did this nep= translator.translate('12', dest='nepali') print(nep.text) the ...
javaNoob's user avatar
0 votes
1 answer
851 views

GoogleTrans suddenly stopped working and giving error

While using googletrans, I am unable to translate my text into any language. I am using python3 to do so. I have googled many things related to my question and have found many answers on Stack ...
Maryam's user avatar
  • 41
0 votes
0 answers
133 views

Strings not getting translated with googletrans API

can someone help me please? I have a df column with around 2.6K entries and its translating only half of them. I looked at the raw file and there is no difference between the strings that are ...
Namrata Lamba's user avatar
5 votes
1 answer
2k views

Python googletrans output differs from the web version of Google Translate

I am trying to use python googletrans package, but it produces lower-quality translations than the web interface of Google Translate. Here is my code: from googletrans import Translator translator = ...
menelik3's user avatar
3 votes
0 answers
670 views

GoogleTrans for Input with Multiple Translations

From what I understand, GoogleTrans makes an Ajax call to the actual Google Translate. It's quite easy to set up and use. I am trying to translate English words into Spanish, but I see that the ...
Afsan Abdulali Gujarati's user avatar