Open MultiPath opened 7 years ago
Not shortly. I'm currently working on the Python 3.x version.
BTW, have you tried 3to2? https://pypi.python.org/pypi/3to2
Yes, I tried. But unfortunately, it did not work.
@MultiPath Try this: https://github.com/bluedazzle/wxpy/tree/py2 I write a py2 version, but not test completely.
install this test verison:
git clone -b py2 git@github.com:bluedazzle/wxpy.git
cd wxpy
python setup.py install
@bluedazzle 目前的情况是, 无法转发消息
Traceback (most recent call last):
File "D:\Program Files\Python27\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File "D:\Program Files\Python27\lib\threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "D:\Program Files\Python27\lib\site-packages\wxpy\api\bot.py", line 479, in _list
en
self._process_message(msg)
File "D:\Program Files\Python27\lib\site-packages\wxpy\api\bot.py", line 422, in _proc
ess_message
config = self.registered.get_config(msg)
File "D:\Program Files\Python27\lib\site-packages\wxpy\api\messages\registered.py", li
ne 40, in get_config
if (isinstance(chat, type) and isinstance(msg.chat, chat)) or chat == msg.chat:
File "D:\Program Files\Python27\lib\site-packages\wxpy\api\chats\chat.py", line 345, i
n __eq__
return hash(self) == hash(other)
TypeError: unhashable type: 'Chats'
UPDATE: 测试python3版本也有这个问题, 所以先忽略.
@grunmin 从报错信息来看,并非转发消息的问题。
是不是注册的聊天对象包含了“列表中的列表”?类似 [1, 2, [3]]
中的 [3]
。
这个问题可能是因为程序中使用 .search()
后没有指定下标 (搜索结果总是为列表)。
Hello @MultiPath
The Python 2.x support
branch is merged into master finally, and I just released a new version.
So, you can try to install wxpy with pip2
now 😄
pip2 install -U wxpy
Will it support python 2?