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

Version 0.8.3下载bilibili视频出现问题 #33

Closed
Chengxcy opened this issue Aug 20, 2022 · 15 comments
Closed

Version 0.8.3下载bilibili视频出现问题 #33

Chengxcy opened this issue Aug 20, 2022 · 15 comments
Labels
bug Something isn't working windows win系统上出现的问题 issue related to Windows OS

Comments

@Chengxcy
Copy link

测试了新版本Version 0.8.3下载bilibili视频时,下载到一半时出现进程错误,尝试卸载新版本,重新安装0.7.2版本没有问题,视频可以正常下载完,应该是新版本问题,望解决
Snipaste_2022-08-20_22-03-14
Snipaste_2022-08-20_22-05-57
Snipaste_2022-08-20_22-12-17

@HFrost0
Copy link
Owner

HFrost0 commented Aug 20, 2022

提供一下原始命令,我瞧瞧。可以先排查一下,关闭文件管理和视频播放器等软件

@HFrost0 HFrost0 added the bug Something isn't working label Aug 20, 2022
@Chengxcy
Copy link
Author

提供一下原始命令,我瞧瞧。可以先排查一下,关闭文件管理和视频播放器等软件
重启PC了,使用新版本就有这种现象,0.7.2版本没有问题。
bilix get_video https://www.bilibili.com/video/BV1sV4y1x76y
Snipaste_2022-08-20_22-24-09

@HFrost0
Copy link
Owner

HFrost0 commented Aug 20, 2022

emmm,你能否帮我试验一下,把D:\Program Files (×86)\Python\lib\site-packages\bilix\utils.py的第54行从

            async with await anyio.open_file(file_list[idx], 'rb') as fa:
                await f.write(await fa.read())
                os.remove(file_list[idx])

改为

            async with await anyio.open_file(file_list[idx], 'rb') as fa:
                await f.write(await fa.read())
            os.remove(file_list[idx])

就是缩进往前一下,因为我在macos和linux上没有遇到这个问题,只能你来帮我测一下了🫠

@Chengxcy
Copy link
Author

emmm,你能否帮我试验一下,把D:\Program Files (×86)\Python\lib\site-packages\bilix\utils.py的第54行从

            async with await anyio.open_file(file_list[idx], 'rb') as fa:
                await f.write(await fa.read())
                os.remove(file_list[idx])

改为

            async with await anyio.open_file(file_list[idx], 'rb') as fa:
                await f.write(await fa.read())
            os.remove(file_list[idx])

就是缩进往前一下,因为我在macos和linux上没有遇到这个问题,只能你来帮我测一下了🫠
Snipaste_2022-08-20_22-35-59

修改过了,您看一下
Snipaste_2022-08-20_22-38-47

@HFrost0
Copy link
Owner

HFrost0 commented Aug 20, 2022

看着好像没对齐哦,os前面看着应该要多加一个空格,跟上面那个52 行async with的a对齐

@Chengxcy
Copy link
Author

看着好像没对齐哦,os前面看着应该要多加一个空格,跟上面那个52 行async with的a对齐

不好意思,让您久等了,现在改好了,刚才在测试,发现可以下载了,但是出现了一个went问题,就是生成的缓存文件没有自动删除,以前没有此问题
Snipaste_2022-08-20_22-45-10
Snipaste_2022-08-20_22-47-55

@HFrost0
Copy link
Owner

HFrost0 commented Aug 20, 2022

哈哈,你这个对齐错了,应该是52行那个。

@Chengxcy
Copy link
Author

看着好像没对齐哦,os前面看着应该要多加一个空格,跟上面那个52 行async with的a对齐
确定文件夹事先是空文件夹,没有任何文件,下载后才生成的。

@HFrost0
Copy link
Owner

HFrost0 commented Aug 20, 2022

我知道了,就是这里代码写的有问题。之前这个地方重构的时候疏忽了,Linux和MacOS的系统可能判定宽松一些,最正确写法应该要在with语句出来之后再对文件进行操作

@Chengxcy
Copy link
Author

我知道了,就是这里代码写的有问题。之前这个地方重构的时候疏忽了,Linux和MacOS的系统可能判定宽松一些,最正确写法应该要在with语句出来之后再对文件进行操作

那没有其他要测试了吧?

@HFrost0
Copy link
Owner

HFrost0 commented Aug 20, 2022

我等下会发布0.8.4,你可以先改了试一试,感谢帮忙debug🙏

@Chengxcy
Copy link
Author

我等下会发布0.8.4,你可以先改了试一试,感谢帮忙debug🙏

还有那个事先生成的缓存文件合并后无法自动删除的问题,麻烦也要修复一下啊。后面0.8.4版本要是没问题的话我就不反馈了,说明我没有发现问题,后面要是有其他问题我再反馈哈。

@HFrost0
Copy link
Owner

HFrost0 commented Aug 20, 2022

哈哈,你这个对齐错了,应该是52行那个。

你那个是因为你缩进错位置了,出了for循环,导致只删掉了最后一个。0.8.4已上传,再次感谢帮忙找bug🥹

@Chengxcy
Copy link
Author

哈哈,你这个对齐错了,应该是52行那个。

你那个是因为你缩进错位置了,出了for循环,导致只删掉了最后一个

哦哦,好的,我不是计算机专业的,业务爱好者。刚才0.8.4新版本测试了,目前完美,可以正常使用了

@HFrost0
Copy link
Owner

HFrost0 commented Aug 20, 2022

没关系,开源项目本来就大家一起找问题解决问题的

@HFrost0 HFrost0 closed this as completed Aug 20, 2022
@HFrost0 HFrost0 added the windows win系统上出现的问题 issue related to Windows OS label Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows win系统上出现的问题 issue related to Windows OS
Projects
None yet
Development

No branches or pull requests

2 participants