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

🐛 AttributeError: 'DanmakuMessage' object has no attribute 'face' #805

Closed
gold74386 opened this issue May 9, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@gold74386
Copy link

您使用的版本? | Your usage version?

例如:main 或者 20230806

您使用的python版本&系统环境? | Your usage python version & system?

例如:
python:3.10.11
系统:win11

您使用的场景? | Your usage scenarios?

您做了什么操作? | What did you do?

您遇到了什么问题? | What are your problems?

您期望的结果是怎样的? | What is your expected outcome?

Traceback (most recent call last):
File "C:\Users\gold\miniconda3\envs\vtu\lib\site-packages\blivedm\clients\ws_base.py", line 492, in _handle_command
self._handler.handle(self, command)
File "C:\Users\gold\miniconda3\envs\vtu\lib\site-packages\blivedm\handlers.py", line 129, in handle
callback(self, client, command)
File "C:\Users\gold\miniconda3\envs\vtu\lib\site-packages\blivedm\handlers.py", line 70, in __danmu_msg_callback
return self._on_danmaku(client, web_models.DanmakuMessage.from_command(command['info']))
File "C:\Users\gold\Desktop\AI-Vtuber\main.py", line 1492, in _on_danmaku
user_face = message.face
AttributeError: 'DanmakuMessage' object has no attribute 'face'

@gold74386 gold74386 added the bug Something isn't working label May 9, 2024
@gold74386
Copy link
Author

Traceback (most recent call last):
File "C:\Users\gold\miniconda3\envs\vtu\lib\site-packages\blivedm\clients\ws_base.py", line 492, in _handle_command
self._handler.handle(self, command)
File "C:\Users\gold\miniconda3\envs\vtu\lib\site-packages\blivedm\handlers.py", line 129, in handle
callback(self, client, command)
File "C:\Users\gold\miniconda3\envs\vtu\lib\site-packages\blivedm\handlers.py", line 70, in __danmu_msg_callback
return self._on_danmaku(client, web_models.DanmakuMessage.from_command(command['info']))
File "C:\Users\gold\Desktop\AI-Vtuber\main.py", line 1492, in _on_danmaku
user_face = message.face
AttributeError: 'DanmakuMessage' object has no attribute 'face'

@Ikaros-521
Copy link
Owner

blivedm库是否是官方最新版本,如果是从pypi装的,就是旧版,没有face属性,如果库版本正常,那就把face删了吧

@Ikaros-521 Ikaros-521 changed the title 🐛 一些问题。。。 | [Bug] Some problem... 🐛 AttributeError: 'DanmakuMessage' object has no attribute 'face' May 10, 2024
@Ikaros-521
Copy link
Owner

或者 修改为
user_face = message.face if hasattr(message, 'face') else None

@Ikaros-521
Copy link
Owner

fixed #806

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants