ChesapeakeCVPR Dataset and ChesapeakeCVPRDataModule throws HTTP Error 403 when downloading
I'm getting a 403 error when I try to download ChesapeakeCVPR dataset with torchgeo I can download file with browser on my local machine
chesapeake_root = os.path.join(tempfile.gettempdir(), 'chesapeake')
os.makedirs(chesapeake_root, exist_ok=True)
chesapeake = ChesapeakeCVPR(chesapeake_root, download=True)
https://github.com/microsoft/torchgeo/blob/3bd85a6f5d4439e40cdfbc1e44cd7eb3fb21f5af/torchgeo/datasets/chesapeake.py#L341
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
[<ipython-input-33-009018e0ed8d>](https://localhost:8080/#) in <cell line: 1>()
----> 1 trainer.fit(model=task, datamodule=datamodule)
17 frames
[/usr/lib/python3.10/urllib/request.py](https://localhost:8080/#) in http_error_default(self, req, fp, code, msg, hdrs)
641 class HTTPDefaultErrorHandler(BaseHandler):
642 def http_error_default(self, req, fp, code, msg, hdrs):
--> 643 raise HTTPError(req.full_url, code, msg, hdrs, fp)
644
645 class HTTPRedirectHandler(BaseHandler):
HTTPError: HTTP Error 403: This request is not authorized to perform this operation.
I'm getting a 403 error when I try to download ChesapeakeCVPR dataset with torchgeo I can download file with browser on my local machine
chesapeake_root = os.path.join(tempfile.gettempdir(), 'chesapeake') os.makedirs(chesapeake_root, exist_ok=True) chesapeake = ChesapeakeCVPR(chesapeake_root, download=True)torchgeo/torchgeo/datasets/chesapeake.py
Line 341 in 3bd85a6
'base': 'https://lilawildlife.blob.core.windows.net/lila-wildlife/lcmcvpr2019/cvpr_chesapeake_landcover.zip',
--------------------------------------------------------------------------- HTTPError Traceback (most recent call last) [<ipython-input-33-009018e0ed8d>](https://localhost:8080/#) in <cell line: 1>() ----> 1 trainer.fit(model=task, datamodule=datamodule) 17 frames [/usr/lib/python3.10/urllib/request.py](https://localhost:8080/#) in http_error_default(self, req, fp, code, msg, hdrs) 641 class HTTPDefaultErrorHandler(BaseHandler): 642 def http_error_default(self, req, fp, code, msg, hdrs): --> 643 raise HTTPError(req.full_url, code, msg, hdrs, fp) 644 645 class HTTPRedirectHandler(BaseHandler): HTTPError: HTTP Error 403: This request is not authorized to perform this operation.
When I try to download with wget command, it starts to download, but using download_url fucntion, it throws HTTP 403 exception.
Duplicate of #2390, fixed by #2445