cassandra连接问题

lg40wkob  于 2021-06-13  发布在  Cassandra
关注(0)|答案(1)|浏览(467)
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/logging/__init__.py", line 994, in emit
    msg = self.format(record)
  File "/usr/local/lib/python3.6/logging/__init__.py", line 840, in format
    return fmt.format(record)
  File "/usr/local/lib/python3.6/logging/__init__.py", line 577, in format
    record.message = record.getMessage()
  File "/usr/local/lib/python3.6/logging/__init__.py", line 338, in getMessage
    msg = msg % self.args
  File "cassandra/connection.py", line 895, in cassandra.connection.Connection.__str__
TypeError: %d format: a number is required, not str
Call stack:
  File "/usr/local/lib/python3.6/threading.py", line 884, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args,**self._kwargs)
  File "/usr/local/lib/python3.6/site-packages/cassandra/io/asyncorereactor.py", line 258, in _run_loop
    self._loop_dispatcher.loop(self.timer_resolution)
  File "/usr/local/lib/python3.6/site-packages/cassandra/io/asyncorereactor.py", line 119, in loop
    asyncore.loop(timeout=timeout, use_poll=True, map=_dispatcher_map, count=1)
  File "/usr/local/lib/python3.6/asyncore.py", line 207, in loop
    poll_fun(timeout, map)
  File "/usr/local/lib/python3.6/asyncore.py", line 188, in poll2
    readwrite(obj, flags)
  File "/usr/local/lib/python3.6/asyncore.py", line 108, in readwrite
    obj.handle_read_event()
  File "/usr/local/lib/python3.6/asyncore.py", line 423, in handle_read_event
    self.handle_read()
  File "/usr/local/lib/python3.6/site-packages/cassandra/io/asyncorereactor.py", line 438, in handle_read
    self.process_io_buffer()
Unable to print the message and arguments - possible formatting error.

Cassandra-version:3.11.5
cassandra驱动程序(python):3.14.0
有时Cassandra会抛出错误,我不知道为什么会这样
我怎么才能让它工作呢

vc6uscn9

vc6uscn91#

问题是你通过了考试 port 当您创建 Cluster 对象(参见相应的源代码行)

相关问题