Skip to content
New issue

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

[BUG]下载歌曲输入序号超出搜索结果序号时出错 #18

Closed
geekspeng opened this issue Mar 16, 2019 · 4 comments
Closed

[BUG]下载歌曲输入序号超出搜索结果序号时出错 #18

geekspeng opened this issue Mar 16, 2019 · 4 comments

Comments

@geekspeng
Copy link

Traceback (most recent call last):
File "/usr/local/bin/music-dl", line 10, in
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/music_dl/main.py", line 136, in main
run()
File "/usr/local/lib/python3.7/site-packages/music_dl/main.py", line 89, in run
run()
File "/usr/local/lib/python3.7/site-packages/music_dl/main.py", line 84, in run
music_download(idx, music_list)
File "/usr/local/lib/python3.7/site-packages/music_dl/core.py", line 40, in music_download
music = music_list[int(idx)]
IndexError: list index out of range

@0xHJK
Copy link
Owner

0xHJK commented Mar 16, 2019

这个不算BUG吧,序号输入超出了自然是没法下载了

@geekspeng
Copy link
Author

可以做一个保护,这样应该对用户更加友好哦,因为我是前面的歌曲都下载成功了,数据越界了就报错,应该防止数组越界的情况吧

@0xHJK
Copy link
Owner

0xHJK commented Mar 16, 2019

好的 后面会改进一下

@0xHJK
Copy link
Owner

0xHJK commented Apr 2, 2019

问题已修复

@0xHJK 0xHJK closed this as completed Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants