扭曲和星形错误(python)

发布于 2024-09-16 13:11:28 字数 1353 浏览 5 评论 0原文

我正在使用这个:

from twisted.web.client import getPage
df = getPage(url) # there is some url

我收到以下错误。请任何人都可以指导我,

ERROR:twsited:Unhandled error in Deferred:
ERROR:twsited:Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/starpy/manager.py", line 123, in lineReceived
    self.dispatchIncoming() # does dispatch and clears cache
  File "/usr/local/lib/python2.6/dist-packages/starpy/manager.py", line 200, in dispatchIncoming
    callback( message )
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 243, in callback
    self._startRunCallbacks(result)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 312, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 328, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/starpy/manager.py", line 298, in errorUnlessResponse
    raise error.AMICommandFailure( message )
starpy.error.AMICommandFailure: {'message': 'Channel not specified', 'response': 'Error', 'actionid': 'askme-158811948-5'}

我不确定这个错误是由于 getPage() 方法造成的,因为即使我对此发表了评论,它仍然给我同样的错误。任何人都可以帮忙。我无法弄清楚错误的原因以及错误产生的位置

I'm using this:

from twisted.web.client import getPage
df = getPage(url) # there is some url

I'm getting the following error. Please can anyone guide me on this

ERROR:twsited:Unhandled error in Deferred:
ERROR:twsited:Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/starpy/manager.py", line 123, in lineReceived
    self.dispatchIncoming() # does dispatch and clears cache
  File "/usr/local/lib/python2.6/dist-packages/starpy/manager.py", line 200, in dispatchIncoming
    callback( message )
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 243, in callback
    self._startRunCallbacks(result)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 312, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 328, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/starpy/manager.py", line 298, in errorUnlessResponse
    raise error.AMICommandFailure( message )
starpy.error.AMICommandFailure: {'message': 'Channel not specified', 'response': 'Error', 'actionid': 'askme-158811948-5'}

I'm not sure this error is due to getPage() method because even when i've commented this it still give me the same error. Can anyone help. I can't figure out the reason for the error and where it is generated

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

长亭外,古道边 2024-09-23 13:11:28

发布的代码不完整。该错误不是由于 getPage 引起的。
从堆栈跟踪线索来看,这使用了 AMIProtocol (线路接收器) 。
我想有些地方你必须

在 star.py 的 AMIProtocol setVar(self,channel,variable,value)

中指定你的协议通道。这不是一个扭曲的问题。

The code posted is not complete. The error is not due to getPage.
From the stack trace clues, this uses AMIProtocol (line receiver) .
I guess some where you have to specify your protocol channel in AMIProtocol

setVar(self, channel, variable, value) in star.py.

This is not a twisted issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文