py-googletrans
py-googletrans copied to clipboard
when i run the demo code, raise a error as following:
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevconsole.py", line 364, in runcode
coro = func()
^^^^^^
File "", line 1, in
it can be installed like this:
pip install googletrans==4.0.0rc1
Use :
translator = Translator()
translation = translator.translate("سلام دوست عزیز", dest='en')
print(translation.text)
#output: 'Hello Dear Friend'
Link : https://github.com/ssut/py-googletrans/issues/234#issuecomment-742460612
Ref : https://stackoverflow.com/questions/52455774/googletrans-stopped-working-with-error-nonetype-object-has-no-attribute-group
it can be installed like this:
pip install googletrans==4.0.0rc1Use :
translator = Translator() translation = translator.translate("سلام دوست عزیز", dest='en') print(translation.text) #output: 'Hello Dear Friend'Link : #234 (comment)
Ref : https://stackoverflow.com/questions/52455774/googletrans-stopped-working-with-error-nonetype-object-has-no-attribute-group
This issue doesn't fix the above issue. I'm also running 4.0.0rc1 and encountered the same issue. I imagine it's an easy fix to change the capitalisation but I would like the project I'm working onto be portable and changing it in each environment is too much.
I uninstalled previous googletrans and installed using following command
pip install googletrans==4.0.0rc1
after that it works for me.
For detailed explaination of problem refer https://stackoverflow.com/questions/52455774/googletrans-stopped-working-with-error-nonetype-object-has-no-attribute-group