I am trying to run a very simple Python code that is supposed to translate a word from French to English. The code is as follows.
from googletrans import Translator
translate = Translator()
result = Translator.translate(text='Bonjour', src='fr', dest='en')
print(result.text)
When I run the code from within the Pycharm Editor (using Python 3), it produces an error:
TypeError: translate() missing 1 required positional argument: 'self'
What is wrong here?