gpt4 book ai didi

python - 使用 msn 协议(protocol)运行 twisted.words 示例时出现问题

转载 作者:太空狗 更新时间:2023-10-30 01:10:41 24 4
gpt4 key购买 nike

我目前正在尝试使用 Twisted 库专门扭曲单词来尝试与 MSN 交互。但是,当我运行 twisted 提供的示例脚本时,出现错误。具体错误在这里找到http://i42.tinypic.com/wl945w.jpg .脚本可以在这里找到 http://twistedmatrix.com/projects/words/documentation/examples/msn_example.py .

平台是带有 Python 2.6 的 Vista

编辑:完整输出:

Email (passport): mypassport@hotmail.com
Password: ******
2009-04-25 10:52:49-0300 [-] Log opened.
2009-04-25 10:52:49-0300 [-] Starting factory <twisted.internet.protocol.ClientFactory instance at 0x9d87e8c>
2009-04-25 10:52:55-0300 [Dispatch,client] Starting factory <twisted.words.protocols.msn.NotificationFactory instance at 0x9e28bcc>
2009-04-25 10:52:55-0300 [Dispatch,client] Stopping factory <twisted.internet.protocol.ClientFactory instance at 0x9d87e8c>
2009-04-25 10:52:55-0300 [Notification,client] Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python2.5/site-packages/twisted/python/log.py", line 84, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/local/lib/python2.5/site-packages/twisted/python/log.py", line 69, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/local/lib/python2.5/site-packages/twisted/python/context.py", line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/local/lib/python2.5/site-packages/twisted/python/context.py", line 37, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/usr/local/lib/python2.5/site-packages/twisted/internet/selectreactor.py", line 146, in _doReadOrWrite
why = getattr(selectable, method)()
File "/usr/local/lib/python2.5/site-packages/twisted/internet/tcp.py", line 460, in doRead
return self.protocol.dataReceived(data)
File "/usr/local/lib/python2.5/site-packages/twisted/protocols/basic.py", line 238, in dataReceived
why = self.lineReceived(line)
File "/usr/local/lib/python2.5/site-packages/twisted/words/protocols/msn.py", line 651, in lineReceived
handler(params.split())
File "/usr/local/lib/python2.5/site-packages/twisted/words/protocols/msn.py", line 827, in handle_USR
d = _login(f.userHandle, f.password, f.passportServer, authData=params[3])
File "/usr/local/lib/python2.5/site-packages/twisted/words/protocols/msn.py", line 182, in _login
reactor.connectSSL(_parsePrimitiveHost(nexusServer)[0], 443, fac, ClientContextFactory())
exceptions.TypeError: 'NoneType' object is not callable

2009-04-25 10:52:55-0300 [Notification,client] Stopping factory <twisted.words.protocols.msn.NotificationFactory instance at 0x9e28bcc>

最佳答案

由于 MSN 涉及 SSL 连接,您必须安装 pyOpenSSL 才能使用它。好像你可能没有。不过,对于 Twisted 来说,这并不是报告此缺失依赖项的好方法。我建议在 Twisted 问题跟踪器中提交一张票以改进此报告。

关于python - 使用 msn 协议(protocol)运行 twisted.words 示例时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/788902/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com