We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/podaac/AGU-2020/tree/main/Part-II/01_sst_shpfile
When using the tutorial linked above, I had to use the urllib package for the data file download from S3.
urllib
Right now, I get a 401 Unauthorized here with requests.get method:
requests.get
r = requests.get(modis_url) with open('tutorial1_data_MODIS.nc', 'wb') as f: f.write(r.content)
That's using the requests library. If I use this instead it downloads with the authenticated session managed by urllib:
requests
import shutil with request.urlopen(modis_url) as response, open('tutorial2_data_MODIS.nc', 'wb') as out_file: print('Content Size:', response.headers['Content-length']) shutil.copyfileobj(response, out_file) print("Downloaded request to tutorial2_data_MODIS.nc")
The second download method works for me, but not the first.
The text was updated successfully, but these errors were encountered:
ScienceCat18
No branches or pull requests
https://github.com/podaac/AGU-2020/tree/main/Part-II/01_sst_shpfile
When using the tutorial linked above, I had to use the
urllib
package for the data file download from S3.Right now, I get a 401 Unauthorized here with
requests.get
method:That's using the
requests
library. If I use this instead it downloads with the authenticated session managed byurllib
:The second download method works for me, but not the first.
The text was updated successfully, but these errors were encountered: