littlecodersh / ItChat

A complete and graceful API for Wechat. 微信个人号接口、微信机器人及命令行微信,三十行即可自定义个人号机器人。
http://itchat.readthedocs.io
MIT License
25.52k stars 5.63k forks source link

First "Python ItChat.py" Fails #3

Closed tobunka closed 8 years ago

tobunka commented 8 years ago

After I cloned this repo and installed the packages mentioned as prerequisites, I typed "python ItChat.py" in the command line, but received nothing but an prompted error that reads as follows:

File "itchat.py", line 11 print 'Start auto-replying' ^ SyntaxError: Missing parentheses in call to 'print'

littlecodersh commented 8 years ago

Thank you for your report! This error is caused because of the version of your python. print is made a function in python 3 (PEP3105) and must be called with parentheses. I will fix the problem today, you may have a try this afternoon. But I still suggest you to install python 2.7.11 to avoid possible problems and have a better compatibility with other programs.

update on 160315 1053h I tried to make the whole project feasible to python3 as solution but I failed. There are quite much difference between them and will make the project messy. So for now, I use the warning solution. I add a warning in the project and on the main page to show that this project should be run with python2.7. Thanks again!

jimipy commented 8 years ago

G:\ItChat-robot>python PluginTest.py [INFO] Group talking plugin is open now, please be careful about it. [WARN] There is something wrong with the format of your plugin/config/tuling.json [SUCC] Command line QRCode plugin loaded [SUCC] msgdealers.autoreply plugin loaded [SUCC] msgdealers.vote plugin loaded [INFO] But whether it can be properly used need to be tested online Loading failed Exit Traceback (most recent call last): File "PluginTest.py", line 101, in pluginOrder = [('autoreply', autoreply), ('tuling', tuling.get_response)] NameError: name 'tuling' is not defined

littlecodersh commented 8 years ago

@jimmy-py 已更新