Python 3.7.4pip 20.2.2google-api-python-client version: Version: 1.10.0When calling this API endpoint:
https://developers.google.com/bid-manager/v1.1/queries/createquery
With this field set to ( should be "America/Los_Angeles" ):
timezoneCode:"Los Angeles/America"
The following error shows up consistently at the wrong layer:
httplib2.RedirectMissingLocation: Redirected but response is missing a location: header
See above.
This is a bug that took hours to track down because the error is manifesting in httplib. Which is the wrong layer to catch this.
Lookin online this crops up every few months and burns a bunch of time. Hopefully having this be reproducible will help.
PS: Look me up at Google if you need to reproduce.
@pkenjora Are you using this in internal code? The internal copy of this library is behind the external one. What version of httplib2 are you using?
The error looks like #891 and is probably from the API returning a status code that httplib2 treats as a redirect by default.
I'm getting this as well for bq load
Google Cloud SDK 306.0.0
alpha 2020.08.14
beta 2020.08.14
bq 2.0.59
core 2020.08.14
gsutil 4.52
kubectl 1.15.11
I don't know what the underlying issue is, but error is BigQuery error in load operation: Could not connect with BigQuery server due to: RedirectMissingLocation('Redirected but the response is missing a Location: header.',)
I figured out the bq command has a separate copy of httplib2 which I suspect doesn't have the fix that was added for gcloud. I manually went in, removed 308, and command worked. As in, the problem is with bq, not with httplib2.
@shadow-light Ah I see, good to know.
@shollyman @steffnay where is the issue tracker for the bq command line tool?
@shadow-light I too am experiencing the same bq load issue, can you elaborate exactly how you removed 308 for your workaround?
I needed to run bq load only once, so I just hacked the httplib2 package that google-api-python was using. I removed 308 from this line.
You do not want to do that to a copy of httplib2 that other packages are using because it's a hack specific to the Google API. A 308 should usually be treated as a redirect. Also note that bq used a separate copy of httplib2 than gcloud on my system, which took me a long time to figure out!
@shadow-light thanks for the details. I was able to downgrade to cloud sdk version 289 where bq load is working fine for large files.
I am experiencing this issue too with the same endpoint: https://developers.google.com/bid-manager/v1.1/queries/createquery.
I have two email addresses (accounts) to access DBM/DisplayVideo360 tool.
I don't know if this can help but:
-with one account, the endpoint works and I don't have any problem.
-with the other account, I can't create queries/reports with the method 'createquery' (for all my advertisers!), and I get the mentioned error:
httplib2.RedirectMissingLocation: Redirected but response is missing a location: header
I am currently working on the following environment:
And I tried to change the versions, upgrade, downgrade, but nothing changes.
Does anyone have more information about this issue?