wechaty / python-wechaty

Python Wechaty is a Conversational RPA SDK for Chatbot Makers written in Python
https://wechaty.readthedocs.io/zh_CN/latest/
Apache License 2.0
1.55k stars 229 forks source link

[Bug]: TypeError: init() got an unexpected keyword argument '_warn_on_bytestring' #383

Open XuanyiJiang opened 1 year ago

XuanyiJiang commented 1 year ago

Environment

- wechaty: 0.10.7
- wechaty-puppet: 0.4.23
- wechaty-puppet-service: 0.8.10
- wechaty-plugin-contrib: 
- token type: padlocal
- the version of wechaty docker container: [0.68]

Description

docker能正常拉起, logs里也可以看到正常的日志。
ding-dong demo的python代码报错

(.venv) PS E:\PythonProjects\XiaomanII> & e:/PythonProjects/XiaomanII/.venv/Scripts/python.exe e:/PythonProjects/XiaomanII/test.py
2023-01-27 20:25:56,452 - PuppetService - WARNING - there are endpoint<127.0.0.1:8080> and token<puppet_padlocal_3f51eded67a8483bb9xxxxxxxxxxxx>, and the endpoint will be used for service ...
Traceback (most recent call last):
File "e:\PythonProjects\XiaomanII\test.py", line 9, in
bot = Wechaty()
File "E:\PythonProjects\XiaomanII.venv\lib\site-packages\wechaty\wechaty.py", line 201, in init
self._plugin_manager: WechatyPluginManager = WechatyPluginManager(
File "E:\PythonProjects\XiaomanII.venv\lib\site-packages\wechaty\plugin.py", line 603, in init
scheduler_options.job_store = SQLAlchemyJobStore(
File "E:\PythonProjects\XiaomanII.venv\lib\site-packages\apscheduler\jobstores\sqlalchemy.py", line 60, in init
Column('id', Unicode(191, _warn_on_bytestring=False), primary_key=True),
File "E:\PythonProjects\XiaomanII.venv\lib\site-packages\sqlalchemy\sql\sqltypes.py", line 323, in init
super().init(length=length, **kwargs)
TypeError: init() got an unexpected keyword argument '_warn_on_bytestring'

Minimum reproducible code

from wechaty import Wechaty, Message import asyncio, os, time

os.environ["WECHATY_PUPPET_SERVICE_TOKEN"] = "puppet_padlocal_3f51eded67a8483bb9exxxxxx"

os.environ["WECHATY_PUPPET_SERVICE_ENDPOINT"] = "127.0.0.1:8080"

bot = Wechaty()

class MyBot(Wechaty): async def on_message(self, msg: Message) -> None: text = msg.text() if text == "ding": res = "dong" await msg.say(res)

asyncio.run(MyBot().start())

panliang5020 commented 1 year ago

sqlalchemy版本降一下试试