googleads / googleads-dfa-reporting-samples

Samples for the DoubleClick for Advertisers Reporting and Trafficking API
Apache License 2.0
106 stars 173 forks source link

Running into TypeError within library sourcecode #93

Open rgreweldinger opened 1 year ago

rgreweldinger commented 1 year ago

We encounter the following error: request = service.placements().list(profileId=profileId)\n File \"/usr/local/airflow/.local/lib/python3.7/site-packages/googleapiclient/discovery.py\", line 980, in method\n for pvalue in pvalues:\nTypeError: 'int' object is not iterable", "timestamp": "2023-06-22T07:33:52.779813Z", "level": "ERROR" We've investigated this and concluded that the error is in the library that you provide. More specifically, in the following piece of code (line 1065):

        for name, regex in parameters.pattern_params.items():
            if name in kwargs:
                if isinstance(kwargs[name], str):
                    pvalues = [kwargs[name]]
                else:
                    pvalues = kwargs[name]
                for pvalue in pvalues:
                    if re.match(regex, pvalue) is None:
                        raise TypeError(
                            'Parameter "%s" value "%s" does not match the pattern "%s"'
                            % (name, pvalue, regex)
                        )

As we did not change anything on our side, we are wondering if something changed on your side. I hope you can help us with this. We are looking forward to your answer.