【发布时间】:2011-07-08 12:48:31
【问题描述】:
我正在使用 asynchat 并尝试使用 python3。收到此错误:
error: uncaptured python exception, closing channel <irc.IRC connected
at 0x9a5286c> (<class 'AttributeError'>:'str' object has no attribute
'more' [/usr/lib/python3.2/asyncore.py|write|89] [/usr/lib/python3.2
/asyncore.py|handle_write_event|462] [/usr/lib/python3.2asynchat.py|
handle_write|194] [/usr/lib/python3.2/asynchat.py|initiate_send|245])
我的代码在 Python 2.6.7 上运行良好。
请给点建议?
更新:我检查了我确实在使用 python3 的 asynchat。
~$ python3
Python 3.2 (r32:88445, Mar 25 2011, 19:28:28)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import asynchat
>>> asynchat
<module 'asynchat' from '/usr/lib/python3.2/asynchat.py'>
>>>
【问题讨论】:
-
您确定问题出在这个 sn-p 上吗?错误显示
'str' object has no attribute 'more'。检查你是否没有在某处打电话给more。 -
@Senthess -- 是的,我很确定问题是异步的,因为 1) 错误消息没有提到我的任何文件; 2) 在我的文件中搜索“更多”不会返回任何相关内容(仅许可块中的单词)。
标签: python exception python-3.x attributeerror