You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an attribute error while trying to call the Client function on the translate object.
Traceback (most recent call last):
File "exmp.py", line 49, in
translate_client = translate.Client(SECRET_KEY)
AttributeError: 'function' object has no attribute 'Client'
Activity
theacodes commentedon Nov 7, 2016
@jlim13 it seems like you overloaded the definition
translate. Do you mind sharing your entire code?theacodes commentedon Nov 7, 2016
It's hard to say without seeing all of your code, but likely you had something like this going on:
when you do that, the
translatefunction shadows thetranslatemodule.StarkGang commentedon Sep 21, 2020
@kelseyhightower u have explained translate as a func
StarkGang commentedon Sep 21, 2020
@theacodes no , he has named translate as function and also imported it
So it gave error
tests: replace spurious googleapis exception w/ api_core (#636)