google-translate

googletrans stopped working with detecting all languages as English

googletrans stopped working with detecting all languages as English Question: 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 English but just printed the original text. Then I checked what goes wrong. I found that googletrans detect all languages …

Total answers: 1

Python: Cannot install googletrans

Python: Cannot install googletrans Question: 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: Collecting googletrans Using cached googletrans-3.0.0.tar.gz (17 kB) ERROR: Could not find a version that satisfies the requirement httpx==0.13.3 (from googletrans) (from …

Total answers: 2

googletrans doesn't translate the numbers

googletrans doesn't translate the numbers Question: 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 output will be : 12 but it should be: १२ Asked By: javaNoob || Source Answers: The Hindu-Arabic counting system (google this) …

Total answers: 1

Free API similar to google translate for python?

Free API similar to google translate for python? Question: I am looking for a free API similar to google translate that can work with my python bot. Is there any similar API available or is there a way to use the google API for free? Asked By: shardul08 || Source Answers: First of all, you …

Total answers: 1

Python googletrans encoding weird chars

Python googletrans encoding weird chars Question: I have an ui which takes german language among other things and translate these in english sentences. # -*- coding: utf-8 -*- from googletrans import Translator def tr(s) translator = Translator() return translator.translate(wordDE,src=’de’,dest=’en’).text Sometimes I get weird characters from the translator. For example: DE: Pascal und PHP sind Programmiersprachen …

Total answers: 1

How to tell Googletrans to ignore certain parts?

How to tell Googletrans to ignore certain parts? Question: I would like to use googletrans to make use of the Google translate API. However, there are strings where are variable names in it: User “%(first_name)s %(last_name)s (%(email)s)” has been deleted. If I use this via googletrans I get from googletrans import Translator translator = Translator() …

Total answers: 2

google.auth.exceptions.DefaultCredentialsError:

google.auth.exceptions.DefaultCredentialsError: Question: So, I am following the same procedure exactly according to the Google Translate API’s Documentation. The code below was provided in it. # Imports the Google Cloud client library from google.cloud import translate # Instantiates a client translate_client = translate.Client() # The text to translate text = u’Hello, world!’ # The target language …

Total answers: 4

GoogleTrans API Error – Expecting value: line 1 column 1 (char 0)

GoogleTrans API Error – Expecting value: line 1 column 1 (char 0) Question: I am having this error when translating thousands of text data in an iteration: Expecting value: line 1 column 1 (char 0) My code for translating big amounts of text: translatedList = [] for index, row in df.iterrows(): newrow = copy.deepcopy(row) try: …

Total answers: 11

Python googletrans

Python googletrans Question: I just came across googletrans python package. This package translates quite well and seems to use google translation API. To my knowledge, google translation API is not free. What googletrans doing internally for the translations? Is it legal to use googletrans? Asked By: FIre Panda || Source Answers: The official documentation has …

Total answers: 1

PyInstaller file fails to execute script – DistributionNotFound

PyInstaller file fails to execute script – DistributionNotFound Question: I’m trying to convert my python file to an executable using PyInstaller. The program uses the Google Cloud Translate API to translate given text between languages. When running python quicktrans.py in the terminal, the program works fine. Then I ran pyinstaller quicktrans.py, SHIFT + right-clicked the …

Total answers: 8