Giter Site home page Giter Site logo

Upgrading problem about google-ads-python HOT 5 CLOSED

miguelem avatar miguelem commented on July 24, 2024
Upgrading problem

from google-ads-python.

Comments (5)

BenRKarl avatar BenRKarl commented on July 24, 2024

@miguelem there are basically 4 ways to set the API version when initializing the GoogleAdsClient class:

  • Passing in the version keyword arg to any of the initialization methods, which will apply to all service clients retrieved:
    • load_from_storage
    • load_from_env
    • load_from_string
    • load_from_dict
  • Directly initializing the class with a version parameter client = GoogleAdsClient(... version=version ...)
  • Manually setting the version property on an initialized client client.version = version
  • Passing the version parameter into the get_service method, which will override the default version (i.e. latest) for just that individual service.

You could search your codebase for any patterns that might match the above. If your application truly is using version 23.0.0 of this library then there's no way it could default to v13 as that version isn't included in the list of available versions.

from google-ads-python.

miguelem avatar miguelem commented on July 24, 2024

Thanks @BenRKarl

There is no mention at all of "version" or "v13" in my (small) codebase. I've just searched again using "Find in files" in VS Code and also checked some key parts manually.

But it's still using v13. In the terminal, I see the following lines in the error message:

In one line:

"Method: /google.ads.googleads.v13.services.GoogleAdsService/SearchStream"

And almost at the end:

File "C:\Users\myuser\.virtualenvs\Django-Allauth-x4AvHHo-\Lib\site-packages\google\ads\googleads\v13\services\services\google_ads_service\client.py", line 3559, in search_stream
    response = rpc(

But I have no idea where this is coming from or how to change it (I'm a noob).

If I do pip show google-ads it shows me Version: 23.0.0

Thanks again!

from google-ads-python.

BenRKarl avatar BenRKarl commented on July 24, 2024

@miguelem Thanks for these details.

Would it be possible to add a line to your application to print the library version at runtime? You can add the below, and I recommend putting the print statement as close to the request logic as possible:

import google.ads.googleads
print(google.ads.googleads.VERSION)

Why I'm interested in this - if your application really was installing version 23.0.0 of this library, then it wouldn't be able to even send a request to the v13 endpoint, because the services and request messages aren't present.

from google-ads-python.

miguelem avatar miguelem commented on July 24, 2024

That printed "21.0.0". After checking everything more carefully, I noticed that I updated the API version on a different environment. I updated the correct environment and now my app it's working OK (using v15 automatically), so it was 100% caused by my silly mistake.

I'm so sorry for wasting your time! Thanks a lot for your help and patience!

from google-ads-python.

BenRKarl avatar BenRKarl commented on July 24, 2024

@miguelem Not a waste at all, glad I could help!

from google-ads-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.