Traceback (most recent call last):
File "C:\Users\yy101\miniconda3\envs\py310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\yy101\miniconda3\envs\py310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\yy101\miniconda3\envs\py310\Scripts\musicdl.exe__main.py", line 7, in
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, kwargs)
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, ctx.params)
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\click\core.py", line 760, in invoke
return callback(*args, **kwargs)
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\musicdl\musicdl.py", line 180, in musicdlcmd
dl_client.run(target_srcs=target_srcs)
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\musicdl\musicdl.py", line 79, in run
self.download(songinfos)
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\musicdl\musicdl.py", line 131, in download
getattr(self, songinfo['source']).download([songinfo])
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\musicdl\modules\sources\base.py", line 29, in download
if task.start():
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\musicdl\modules\utils\downloader.py", line 28, in start
total_size, chunk_size, downloaded_size = int(response.headers['content-length']), songinfo.get('chunk_size', 1024), 0
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\requests\structures.py", line 52, in getitem
return self._store[key.lower()][1]
KeyError: 'content-length'
Environment (使用环境)
测试搜索“黑夜问白天”, 下载序号0,来源为MIGU
显示如下错误。 获取response 的时候找不到content-length 吧?
Traceback (most recent call last): File "C:\Users\yy101\miniconda3\envs\py310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\yy101\miniconda3\envs\py310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\yy101\miniconda3\envs\py310\Scripts\musicdl.exe__main.py", line 7, in
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, kwargs)
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, ctx.params)
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\click\core.py", line 760, in invoke
return callback(*args, **kwargs)
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\musicdl\musicdl.py", line 180, in musicdlcmd
dl_client.run(target_srcs=target_srcs)
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\musicdl\musicdl.py", line 79, in run
self.download(songinfos)
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\musicdl\musicdl.py", line 131, in download
getattr(self, songinfo['source']).download([songinfo])
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\musicdl\modules\sources\base.py", line 29, in download
if task.start():
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\musicdl\modules\utils\downloader.py", line 28, in start
total_size, chunk_size, downloaded_size = int(response.headers['content-length']), songinfo.get('chunk_size', 1024), 0
File "C:\Users\yy101\miniconda3\envs\py310\lib\site-packages\requests\structures.py", line 52, in getitem
return self._store[key.lower()][1]
KeyError: 'content-length'