Closed ghost closed 1 year ago
- wechaty: - wechaty-puppet: - wechaty-puppet-service: - wechaty-plugin-contrib: - token type: padlocal|wxwork|xp - the version of wechaty docker container: [0.65]
room这个模块好像用不了,控制台会显示error,请教这是什么问题呀? 2022-11-26 10:54:03,289 - Wechaty - ERROR - internal error <partially initialized module 'room' has no attribute 'ready' (most likely due to a circular import)> ``
import os import asyncio from wechaty import Wechaty, Room, Message os.environ["WECHATY_PUPPET_SERVICE_ENDPOINT"] = "127.0.0.1:8080" os.environ["WECHATY_PUPPET_SERVICE_TOKEN"] = "insecure_40fc7334-1234-5678-7777-780948c983d41" os.environ["WECHATY_PUPPET_WECHAT_PUPPETEER_UOS"] = "true" class MyBot(Wechaty): async def on_message(self, msg: Message) -> None: room: "Room" = msg.room() announce = await room.announce() print(f'群公告为: {announce}') asyncio.run(MyBot().start())
Environment
Description
Minimum reproducible code