haebeom-lee / l2b

Tensorflow implementation of "Learning to Balance: Bayesian Meta-learning for Imbalanced and Out-of-distribution Tasks" (ICLR 2020 oral)
99 stars 10 forks source link

KeyError: 'content-length' occurs when I try to download some datasets. #4

Closed shlee625 closed 4 years ago

shlee625 commented 4 years ago

Hi. When I try to download some datasets (mimgnet, CUB, quickdraw), an error occurs and cannot download them.

Traceback (most recent call last):
  File "get_data.py", line 37, in <module>
    download_file('http://www.vision.caltech.edu/visipedia-data/CUB-200-2011/CUB_200_2011.tgz','CUB_200_2011.tgz')
  File "get_data.py", line 28, in download_file
    pbar = tqdm( unit="B", total=int( r.headers['Content-Length'] ) )
  File "/home/dmsl/miniconda3/envs/tf-1.15/lib/python3.7/site-packages/requests/structures.py", line 54, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'content-length'

In the case of CUB, the URL redirects me to a Google drive link so it can be solved by manually download it. But for mimgnet and quickdraw, the URL can be accessed because of error 404.

HayeonLee commented 4 years ago

Thanks for your interest in our paper!

We updated get_data.py for mimgnet, CUB, quickdraw.

You can download dataset by using python get_data.py.

If you have any questions or problem, feel free to contact us.

Best, Hayeon Lee