Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.21 KB | None | 0 0
  1.     Traceback (most recent call last):
  2.       File "/usr/lib/python2.6/dist-packages/twisted/python/log.py", line 84, in callWithLogger
  3.         return callWithContext({"system": lp}, func, *args, **kw)
  4.       File "/usr/lib/python2.6/dist-packages/twisted/python/log.py", line 69, in callWithContext
  5.         return context.call({ILogContext: newCtx}, func, *args, **kw)
  6.       File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 59, in callWithContext
  7.         return self.currentContext().callWithContext(ctx, func, *args, **kw)
  8.       File "/usr/lib/python2.6/dist-packages/twisted/python/context.py", line 37, in callWithContext
  9.         return func(*args,**kw)
  10.     --- <exception caught here> ---
  11.       File "/usr/lib/python2.6/dist-packages/twisted/internet/selectreactor.py", line 146, in _doReadOrWrite
  12.         why = getattr(selectable, method)()
  13.       File "/usr/lib/python2.6/dist-packages/twisted/internet/tcp.py", line 664, in doConnect
  14.         self._connectDone()
  15.       File "/usr/lib/python2.6/dist-packages/twisted/internet/tcp.py", line 667, in _connectDone
  16.         self.protocol = self.connector.buildProtocol(self.getPeer())
  17.       File "/usr/lib/python2.6/dist-packages/twisted/internet/base.py", line 1045, in buildProtocol
  18.         return self.factory.buildProtocol(addr)
  19.       File "/home/lucio/src/cassandra/Telephus/telephus/protocol.py", line 164, in buildProtocol
  20.         keyspace=self.keyspace)
  21.     exceptions.TypeError: __init__() got an unexpected keyword argument 'keyspace'
  22.  
  23.  
  24. lucio@persephone:~/src/cassandra/Telephus$ git diff example.py
  25. diff --git a/example.py b/example.py
  26. index 02a785c..a1a3d82 100644
  27. --- a/example.py
  28. +++ b/example.py
  29. @@ -1,5 +1,5 @@
  30.  #!/usr/bin/python
  31. -from telephus.protocol import ManagedCassandraClientFactory
  32. +from telephus.protocol import ManagedCassandraClientFactory,  TBinaryProtocol
  33.  from telephus.client import CassandraClient
  34.  from telephus.cassandra.ttypes import ColumnPath, ColumnParent, Column, SuperColumn
  35.  from twisted.internet import defer
  36. @@ -55,6 +55,7 @@ if __name__ == '__main__':
  37.      log.startLogging(sys.stdout)
  38.  
  39.      f = ManagedCassandraClientFactory()
  40. +    f.protocol =  TBinaryProtocol.TBinaryProtocol
  41.      c = CassandraClient(f, KEYSPACE)
  42.      dostuff(c)
  43.      reactor.connectTCP(HOST, PORT, f)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement