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]: ERROR - internal error 您好 上传文件可以接收能读到类型,但是保存不到本地 await msg.to_file_box() 是不是python这个方法不支持了 #423

Open
lizihao001 opened this issue Mar 13, 2024 · 7 comments

Comments

@lizihao001
Copy link

Environment

if msg.type() == MessageType.MESSAGE_TYPE_ATTACHMENT:
            print(f'接收的文件类型: {msg.type()}')
            print(f'接收的文件类型:{msg.type()}准备下载文件...')

            file_box = await msg.to_file_box()
            print(f'文件名:{file_box.name}')
            file_path = f'D:\WorkSpace\wechaty_file/{file_box.name}'
            await file_box.to_file(file_path,True)
            print(f'文件保存路径:{file_path}')
else:
            print(f'3.13错误:{msg.type()}')
            print(f'错误:{traceback.print_exc()}')

Description

3.13错误:13
NoneType: None
错误:None
可以获取到文件类型 但是保存不到本地  不知是什么原因

Minimum reproducible code

NoneType: None
await msg.to_file_box()方法
获取不到文件

@lizihao001
Copy link
Author

***解决一下呗

@Carey8175
Copy link

问题解决了吗?我现在这个问题也解决不了

@lizihao001
Copy link
Author

lizihao001 commented May 4, 2024 via email

@Carey8175
Copy link

我是个人微信,我将语音消息通过to_file_box会报错,2024-05-04 16:35:51,599 - Wechaty - ERROR - internal error <>
但是我看官方文档都是这么做的,我用的docker最新的wechaty,并且是padlocal协议。
感觉这个项目似乎被遗弃了已经

@lizihao001
Copy link
Author

lizihao001 commented May 4, 2024 via email

@Carey8175
Copy link

我刚刚确定问题了,在1.2版本的docker中,语音保存文件就是会报错。我把docker切换到了0.65版本,就不会出现问题了

@lizihao001
Copy link
Author

lizihao001 commented May 4, 2024 via email

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