-
Notifications
You must be signed in to change notification settings - Fork 731
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
AttributeError: 'None type' object has no attribute 'group' #398
Labels
Comments
same here +1 |
|
googletrans==3.1.0a0 works when used alone. But it has package dependency error when used along with langchain or llama index. Why is the googletrans latest version so old? What is the alternative or way to fix this? |
using 4.0.0rc1 version right now, yet still got this problem. seems googletrans need updating |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is my code:
`import httpcore
setattr(httpcore, 'SyncHTTPTransport', any)
from googletrans import Translator
import time
languages = ['ar', 'bg', 'hu', 'el', 'da', 'iw', 'ky', 'lo', 'mn', 'de', 'pt', 'ro', 'so', 'tt', 'uz', 'fr', 'hr', 'cs', 'sv', 'et', 'ja']
sentence = input('Enter sentence to translate: ')
translator = Translator()
for lang in languages:
translated = translator.translate(sentence, dest=lang)
final_translation = translator.translate(translated.text, src=lang, dest='en')
print(f'Translate to {final_translation.dest}: {final_translation.text}')`
I wanted to make kind of 'funny translator', which takes a sentence, translates it throught different languages, and then shows the result.
But when I run the programm, I'm recieving that error:
AttributeError: 'None type' object has no attribute 'group'
I tryed to run the programm on 4.0.0rc1 and 3.1.0a0, but it's still doesn't works
How can I fix it? (my Python version: 3.10.5)
The text was updated successfully, but these errors were encountered: