Skip to content
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

module 'googleads.oauth2' has no attribute #393

Open
mgallivan-loknow opened this issue Apr 16, 2019 · 2 comments
Open

module 'googleads.oauth2' has no attribute #393

mgallivan-loknow opened this issue Apr 16, 2019 · 2 comments
Assignees

Comments

@mgallivan-loknow
Copy link

When running the access token example, I receive the error

AttributeError: module 'googleads.oauth2' has no attribute 'GetAPIScope'

However, I can run the following without issue

from googleads import oauth2

I install the library using pip install googleads and all the necessary files, including oauth2.py, can be found inside

/Users/username/DevEnv/lib/python3.7/site-packages/googleads/

Does this have something to do with how I import the package, or am I using an old example?

@mgallivan-loknow
Copy link
Author

I should also note that running the folllowing

from googleads import oauth2
import sys, inspect
for name, obj in inspect.getmembers(sys.modules["googleads.oauth2"]):
    if inspect.isclass(obj):
        print(obj)

results in the expected

<class 'googleads.oauth2.GoogleAccessTokenClient'>
<class 'googleads.oauth2.GoogleOAuth2Client'>
<class 'googleads.oauth2.GoogleRefreshTokenClient'>
<class 'googleads.oauth2.GoogleRefreshableOAuth2Client'>
<class 'googleads.oauth2.GoogleServiceAccountClient'>

@BenRKarl
Copy link
Contributor

BenRKarl commented Jul 9, 2019

@mgallivan-loknow sorry for the delayed response. Can you share the full stack trace you're getting? Also how are you executing the example? Is it via a bash command line?

@BenRKarl BenRKarl self-assigned this Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants