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

create query - httplib2.RedirectMissingLocation: Redirected but the response is missing a Location: header. #18

Open
eduardoblucas opened this issue Jan 28, 2021 · 1 comment

Comments

@eduardoblucas
Copy link

Hi,

I'm getting this error when I create a new query. Any ideas on how to fix this?

httplib2.RedirectMissingLocation: Redirected but the response is missing a Location: header.

query_test = {
    "kind": "doubleclickbidmanager#query",
    "metadata": {
        "dataRange": "LAST_30_DAYS",
        "format": "CSV",
        "googleCloudStoragePathForLatestReport": "",
        "googleDrivePathForLatestReport": "",

        "locale": "",
        "reportCount": 0,
        "running": False,
        "sendNotification": False,
        "shareEmailAddress": [
            ""
        ],
        "title": ""
    },
    "params": {
        "filters": [
            {}
        ],
        "groupBys": [
            "FILTER_ADVERTISER",
            "FILTER_ADVERTISER_CURRENCY",
            "FILTER_CREATIVE",
            "FILTER_CM_PLACEMENT_ID",
            "FILTER_DATE"

        ],
        "includeInviteData": False,
        "metrics": [
            "METRIC_BILLABLE_IMPRESSIONS",
            "METRIC_IMPRESSIONS",
            "METRIC_CLICKS",
            "METRIC_CLIENT_COST_ADVERTISER_CURRENCY",
            "METRIC_PLATFORM_FEE_ADVERTISER",
            "METRIC_PLATFORM_FEE_RATE",
            "METRIC_DATA_COST_ADVERTISER",
            "METRIC_CPM_FEE1_ADVERTISER",
            "METRIC_TOTAL_MEDIA_COST_ADVERTISER"
        ],
        "type": "TYPE_ACTIVE_GRP"
    },

    "schedule": {

        "frequency": "DAILY",
        "nextRunTimezoneCode": ""
    },
    "timezoneCode": "Europe/London"
}
createdQuery = service.queries().createquery(body=query_test).execute()
@tmulchay
Copy link
Collaborator

Hi,

I believe this error is being caused by the query not being valid. I'd recommend that you test your query on our createquery reference documentation page before using it to test your client library implementation.

If you are having trouble building a successful query request, I'd recommend contacting our API support using our support contact form.

Thank you,
Trevor Mulchay, DBM API Team

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