-
Notifications
You must be signed in to change notification settings - Fork 228
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]: 'NoneType' object has no attribute 'encode' #397
Comments
I am also encountering the same issue. |
在Python 3.9上也遇到这样的问题,换到3.8就可以了。 |
不行呀,我换到python3.8.0还是不行 |
请问一下您解决了吗 |
俺也一样 |
我现在换3.8试试,要是不行的话,把你头打疤 |
可以个der,你个老6。。
|
老哥们,直接换JS吧,连docker都不用配置, const {WechatyBuilder} = require('wechaty')
const wechaty = WechatyBuilder.build({
puppetOptions: {
uos: true,
}
})
wechaty
.on('scan', (qrcode, status) => console.log(`Scan QR Code to login: ${status}\nhttps://wechaty.js.org/qrcode/${encodeURIComponent(qrcode)}`))
.on('login', user => console.log(`User ${user} logged in`))
.on('message', async (message) => {
console.log(`Message: ${message}`)
if (message.text() === '你好呀') {
await message.say('哈哈啊');
}
})
wechaty.start() |
有绕过的方法吗 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Description
An error occurred in the operation of the program: 2023-05-13 22:49:12,080 - Wechaty - INFO - init_puppet_event_bridge() <<wechaty_puppet_service.puppet.PuppetService object at 0x7f625e3c8898>> 2023-05-13 22:49:12,080 - Wechaty - INFO - initPuppetEventBridge() puppet.on(dong) (listenerCount:1) registering... 2023-05-13 22:49:12,080 - Wechaty - INFO - initPuppetEventBridge() puppet.on(error) (listenerCount:1) registering... 2023-05-13 22:49:12,080 - Wechaty - INFO - initPuppetEventBridge() puppet.on(heart-beat) (listenerCount:1) registering... 2023-05-13 22:49:12,080 - Wechaty - INFO - initPuppetEventBridge() puppet.on(ready) (listenerCount:1) registering... 2023-05-13 22:49:12,080 - Wechaty - INFO - receive <reset> event <%s> 2023-05-13 22:49:12,080 - Wechaty - INFO - initPuppetEventBridge() puppet.on(reset) (listenerCount:0) registering... 2023-05-13 22:49:12,081 - Wechaty - INFO - initPuppetEventBridge() puppet.on(friendship) (listenerCount:1) registering... 2023-05-13 22:49:12,081 - Wechaty - INFO - initPuppetEventBridge() puppet.on(login) (listenerCount:1) registering... 2023-05-13 22:49:12,081 - Wechaty - INFO - initPuppetEventBridge() puppet.on(logout) (listenerCount:1) registering... 2023-05-13 22:49:12,081 - Wechaty - INFO - initPuppetEventBridge() puppet.on(message) (listenerCount:1) registering... 2023-05-13 22:49:12,081 - Wechaty - INFO - initPuppetEventBridge() puppet.on(room-invite) (listenerCount:1) registering... 2023-05-13 22:49:12,081 - Wechaty - INFO - initPuppetEventBridge() puppet.on(room-join) (listenerCount:1) registering... 2023-05-13 22:49:12,081 - Wechaty - INFO - initPuppetEventBridge() puppet.on(room-leave) (listenerCount:1) registering... 2023-05-13 22:49:12,081 - Wechaty - INFO - initPuppetEventBridge() puppet.on(room-topic) (listenerCount:1) registering... 2023-05-13 22:49:12,081 - Wechaty - INFO - initPuppetEventBridge() puppet.on(scan) (listenerCount:1) registering... 2023-05-13 22:49:12,081 - Wechaty - INFO - starting puppet ... 2023-05-13 22:49:12,081 - PuppetService - INFO - init puppet ... 2023-05-13 22:49:12,082 - PuppetService - INFO - starting the puppet ... 'NoneType' object has no attribute 'encode'
Minimum reproducible code
import os, asyncio
from wechaty import Message, Wechaty
async def on_message(msg: Message):
if msg.text() == 'ding':
await msg.say('dong')
async def main():
bot = Wechaty()
bot.on('message', on_message)
asyncio.run(main())
The text was updated successfully, but these errors were encountered: