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

Unable to run the basic App Engine (Python) demo for Adwords API #273

Closed
GiladIMC opened this issue Apr 12, 2018 · 8 comments
Closed

Unable to run the basic App Engine (Python) demo for Adwords API #273

GiladIMC opened this issue Apr 12, 2018 · 8 comments
Assignees
Labels

Comments

@GiladIMC
Copy link

I have cloned and deployed the Python App Engine Demo for the AdWords API (from here)
After going through the tutorial multiple time to understand how to retrieve the refresh token I get the following error from the online app:

Error: ('Connection broken: IncompleteRead(299 bytes read)', IncompleteRead(299 bytes read))

I don't think it has something to do with the credentials I have provided (otherwise I would expect a more verbose error)

What am I missing?
I have a feeling it has to do with the App Engine Environment

The application was deployed to the following link (not the flex environment):
https://adwordsimos.appspot.com

Any help would be appreciated

Thanks

Gilad

@msaniscalchi
Copy link
Contributor

Hello Gilad,

Thanks for the report! Troubleshooting App Engine is a bit beyond the scope of this issue tracker, but I'll try to reproduce and verify if there is an underlying library issue at play here.

Regards,
Mark

@GiladIMC
Copy link
Author

Thank you for the quick reply!
I got directed here from the AdWords Google group thread

Thanks for the help!

@msaniscalchi
Copy link
Contributor

I've been able to reproduce the issue. Aside from what you reported, it appears there's potentially other issues as well. For example:

  • The README.md suggests that all dependencies can be installed; however, lxml actually needs to be manually added via changes to the app.yaml file.
  • The googleads version specified in requirements.txt is not up to date, but also not usable because it refers to a patch release that wasn't actually released on PyPI. It should be 11.0.1, to reflect the current version.

While I haven't confirmed the root cause yet, I can confirm that the example works on 10.1.0. It seems likely related to the changes introduced in 11.0.0.

@GiladIMC
Copy link
Author

I was able to solve these two issues (took me a while :) )
Would you recommend that I use 10.1.0 in the meantime so I could advance with my project?

@msaniscalchi
Copy link
Contributor

Would you recommend that I use 10.1.0 in the meantime so I could advance with my project?

If that works for you, sure. A fix resolving this in the current version will likely align with the next API release.

@msaniscalchi
Copy link
Contributor

Additional issues discovered:

  • The cause of the reported issue is a ChunkedEncodingError, that occurs because the requests library and App Engine don't work so well together by default. See the work-around.
  • By default, AdWordsClient will use Zeep. In api_handler.py, the APIHandler.__init__ should specify a cache kwarg value of ZeepServiceProxy.NO_CACHE.

All of these issues are actually isolated to the example itself; no changes to the client in 11.0.0/1 will be necessary. You can work with this version, provided that you make the aforementioned changes. As mentioned earlier, we'll push these changes with the next release.

@msaniscalchi
Copy link
Contributor

This will be resolved alongside the upcoming DFP release.

@msaniscalchi
Copy link
Contributor

This was fixed in the last release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants