Skip to content
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

example2里的例子和README里不一样 #1

Open
zhangchunlin opened this issue Oct 18, 2013 · 5 comments
Open

example2里的例子和README里不一样 #1

zhangchunlin opened this issue Oct 18, 2013 · 5 comments

Comments

@zhangchunlin
Copy link

~/oss/PyAIML/example2$ python simple.py
Loading cn-startup.xml... done (0.02 seconds)
Loading cn-test.aiml... done (0.00 seconds)

你好
你现在在什么地方?
厦门
真希望我也在厦门, 陪你.
北京
我暂时不会说别的了.
真的吗?
我暂时不会说别的了.
太好了
我暂时不会说别的了.
谢谢
我暂时不会说别的了.
你好
我暂时不会说别的了.
exit
我暂时不会说别的了.

@andelf
Copy link
Owner

andelf commented Oct 18, 2013

规则可能我写错了我再看看。修了我回复你。

@zhangchunlin
Copy link
Author

注意前面那些loading的输出也不太一样,少了一个

@zhangchunlin
Copy link
Author

啥时候能解决啊?

@sunzejian
Copy link

活动代码页: 936

D:\python\example2>python simple.py
Loading cn-startup.xml... done (0.02 seconds)
Loading cn-test.aiml... done (0.00 seconds)

再见
浣犵幇鍦ㄥ湪浠€涔堝湴鏂?
谢谢
鐪熷笇鏈涙垜涔熷湪袥谢, 闄綘.
hello
鎴戞殏鏃朵笉浼氳鍒殑浜?

老师,我在cmd里面测试了一下,老是出来乱码,将cmd切换到utf-8(chcp 65001)之后程序无法执行,像下面这样
Active code page: 65001

D:\python\example2>python simple.py
Loading cn-startup.xml... done (0.02 seconds)
Traceback (most recent call last):
File "simple.py", line 22, in
k.respond("load aiml cnask")
File "../aiml\Kernel.py", line 343, in respond
response = self._respond(s, sessionID)
File "../aiml\Kernel.py", line 407, in _respond
response += self._processElement(elem, sessionID).strip()
File "../aiml\Kernel.py", line 438, in _processElement
return handlerFunc(elem, sessionID)
File "../aiml\Kernel.py", line 947, in _processTemplate
response += self._processElement(e, sessionID)
File "../aiml\Kernel.py", line 438, in _processElement
return handlerFunc(elem, sessionID)
File "../aiml\Kernel.py", line 692, in _processLearn
self.learn(filename)
File "../aiml\Kernel.py", line 294, in learn
if self._verboseMode: print "Loading %s..." % f,
LookupError: unknown encoding: cp65001

D:\python\example2>

请问可能出错在哪里啊

@andelf
Copy link
Owner

andelf commented Mar 4, 2017

编码耶。。。就是编码错了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants