🐛 Description
In MacOS and Linux, fail to run examples/FuzzyCDF/prepare_dataset.ipynb if not install rar and unrar.
Error Message
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
TypeError Traceback (most recent call last)
/tmp/ipykernel_32072/1971457670.py in
2 from EduData import get_data
3
----> 4 get_data("math2015", "../../data")
~/miniconda3/lib/python3.9/site-packages/EduData/DataSet/download_data/download_data.py in get_data(dataset, data_dir, override, url_dict)
221
222 try:
--> 223 return download_data(url, data_dir, override)
224 except FileExistsError:
225 logger.info("file existed, skipped")
~/miniconda3/lib/python3.9/site-packages/EduData/DataSet/download_data/download_data.py in download_data(url, data_dir, override, bloom_filter)
188 os.makedirs(data_dir, exist_ok=True)
189 save_path = path_append(data_dir, url.split('/')[-1], to_str=True)
--> 190 _data_dir = download_file(url, save_path, override)
191 bloom_filter.add(url)
192 return _data_dir
~/miniconda3/lib/python3.9/site-packages/EduData/DataSet/download_data/download_data.py in download_file(url, save_path, override, chunksize)
127
128 mode = 'wb+'
--> 129 content_len = int(res.headers.get('content-length'))
130 # Check if server supports range feature, and works as expected.
131 if res.status_code == 206:
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
To Reproduce
(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)
Steps to reproduce
(Paste the commands you ran that produced the error.)
1.run examples/FuzzyCDF/prepare_dataset.ipynb
What have you tried to solve it?
1.Install rar and unrar in MacOS ,so it work well in local server
2.Fail to install rar and unrar in lab server because of permission
Environment
Environment Information
Operating System:
MacOS
Python Version: (e.g., python3.6, anaconda/python3.7, venv/python3.8)
python 3.9.5
Additional context