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

build() got an unexpected keyword argument 'static_discovery' #18

Open
reichaves opened this issue Oct 10, 2022 · 1 comment
Open

build() got an unexpected keyword argument 'static_discovery' #18

reichaves opened this issue Oct 10, 2022 · 1 comment
Labels

Comments

@reichaves
Copy link

Hi

In python 3 I am using the Perspective API project. I enabled an api_key and received confirmation by email

But I got this error when I tried to use it - I used the same example from the tutorial:

client = discovery.build(
        "commentanalyzer",
        "v1alpha1",
        developerKey=API_KEY,
        discoveryServiceUrl="https://commentanalyzer.googleapis.com/$discovery/rest?version=v1alpha1",
        static_discovery=False,
        )

---------------------------------------------------------------------------

TypeError                                 Traceback (most recent call last)

[<ipython-input-7-0eef0f741764>](https://localhost:8080/#) in <module>
     12         developerKey=API_KEY,
     13         discoveryServiceUrl="https://commentanalyzer.googleapis.com/$discovery/rest?version=v1alpha1",
---> 14         static_discovery=False,
     15         )
     16 

[/usr/local/lib/python3.7/dist-packages/googleapiclient/_helpers.py](https://localhost:8080/#) in positional_wrapper(*args, **kwargs)
    132                 elif positional_parameters_enforcement == POSITIONAL_WARNING:
    133                     logger.warning(message)
--> 134             return wrapped(*args, **kwargs)
    135 
    136         return positional_wrapper

TypeError: build() got an unexpected keyword argument 'static_discovery'

Please, does anyone know how to resolve this error?

@reichaves reichaves added the bug label Oct 10, 2022
@reichaves
Copy link
Author

The problem is that the script doesn't work as a notebook inside Colab. I tested it now as .py and it worked

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

1 participant