Mozilla Raindrop 在 Ubuntu 上的测试失败,出现“exceptions.TypeError: url 必须是 str,而不是 unicode”

Mozilla Raindrop 在 Ubuntu 上的测试失败,出现“exceptions.TypeError: url 必须是 str,而不是 unicode”

我该如何解决这个问题?

我运行了测试 ./test-raindrop.py 但全部失败并出现相同的错误:

    Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 751, in _inlineCallbacks
    result = g.send(result)
  File "/home/stuartcw/Documents/Code/raindrop/server/python/raindrop/model.py", line 434, in _do_update_views
    _ = yield self.open_view(did, vn, limit=0)
  File "/home/stuartcw/Documents/Code/raindrop/server/python/raindrop/model.py", line 117, in open_view
    return self.db.openView(docId, viewId, *args, **kwargs)
  File "/home/stuartcw/Documents/Code/raindrop/server/python/raindrop/wetpaisley.py", line 111, in openView
    return requester(uri, *xtra
  File "/usr/local/lib/python2.6/dist-packages/paisley-0.1-py2.6.egg/paisley.py", line 286, in get
    return self._getPage(uri, method="GET")
  File "/home/stuartcw/Documents/Code/raindrop/server/python/raindrop/wetpaisley.py", line 74, in _getPage
    factory = HTTPClientFactory(url, **kwargs)
  File "/usr/lib/python2.6/dist-packages/twisted/web/client.py", line 258, in __init__
    self.setURL(url)
  File "/usr/lib/python2.6/dist-packages/twisted/web/client.py", line 269, in setURL
    scheme, host, port, path = _parse(url)
  File "/usr/lib/python2.6/dist-packages/twisted/web/client.py", line 415, in _parse
    parsed = http.urlparse(url)
  File "/usr/lib/python2.6/dist-packages/twisted/web/http.py", line 183, in urlparse
    raise TypeError("url must be str, not unicode")
exceptions.TypeError: url must be str, not unicode

任何帮助表示感谢

答案1

此问题已修复。请参阅 getsatisfaction 上的讨论: http://getsatisfaction.com/mozilla_messaging/topics/twisted_errors_on_run_raindrop_py

您基本上需要更新您的 raindrop 代码库。如果您使用 mercurial 安装,请切换到源代码的根目录并执行“hg pull”,然后执行“hg update”。这应该可以解决问题。

相关内容