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
{{ message }}
Repository navigation
NameError: name 'oauth2' is not defined when running client library setup code #349
Thanks for the report! Looks like some updates may be in order.
So first off, the GetAPIScope function is a helper intended to get the appropriate scope for APIs supported by this library. Thus, the import you're looking for is:
from googleads import oauth2
Second, it looks like there's another issue you've not yet noticed where from_client_secrets_file is not quite correct; scope should not be a keyword argument. It should instead look like:
Activity
msaniscalchi commentedon Nov 20, 2018
Hello,
Thanks for the report! Looks like some updates may be in order.
So first off, the
GetAPIScopefunction is a helper intended to get the appropriate scope for APIs supported by this library. Thus, the import you're looking for is:Second, it looks like there's another issue you've not yet noticed where
from_client_secrets_fileis not quite correct; scope should not be a keyword argument. It should instead look like:Feel free to reach out if you have any additional issues. I'll leave this open until we've updated the guide.
Regards,
Mark
sammillendo commentedon May 2, 2021
hi @msaniscalchi I tried this but I'm getting an error that says
FileNotFoundError: [Errno 2] No such file or directory:Should I save the json_file in my directory?