python - Cassandra Python驱动程序3.0.0 "IndexError: Buffer slice out of bounds"异常

标签 python cassandra datastax

目前,我们在 ubuntu 14.04 上使用 Cassandra Python 驱动程序 3.0.0,当检索的行包含大 map 时,我们遇到了“IndexError: Buffer slice out ofbounds”异常。

    >>> query = 'SELECT "user_id", "data" FROM users WHERE user_id IN (bb47d269-73a6-475a-9283-0002e2a0872a, 81258ffd-fbb0-47e6-8a5e-0003208880ba)'
    >>> future = store.session.execute_async(query)
    >>> future.result() <- exception generated here
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "cassandra/cluster.py", line 3122, in cassandra.cluster.ResponseFuture.result (cassandra/cluster.c:59993)
    IndexError: Buffer slice out of bounds

数据为 map ,包含约3000条条目。

最佳答案

这看起来与此处已打开的问题非常相似。

https://datastax-oss.atlassian.net/browse/PYTHON-459

该修复尚未在主要版本中发布,但应该会在 3.1 中发布。同时,您可以通过使用 --no-cython 标志安装驱动程序来解决此问题。您可能会看到性能略有下降,但它应该可以解决您的问题。

如果您使用 pip 安装,在安装时禁用 cython 的可靠方法是运行。

“CASS_DRIVER_NO_CYTHON=1 pip 安装 casandra 驱动程序”

请确保在重新安装之前卸载。

关于python - Cassandra Python驱动程序3.0.0 "IndexError: Buffer slice out of bounds"异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34780527/

相关文章:

gocql Query.Get() 与 Query.GetRelease()

kubernetes - 如何将启用 SSL 的 Cassandra 集群配置为 cassandra-reaper 的后端存储?

java - cassandra 中的全表扫描问题

java - Cassandra 3.11.6 无法启动 Windows 10

python正则表达式根据标准分割

python - Django:何时使用 QuerySet 无

python - Datastax cassandra-driver (python) 导入失败

Cassandra : LOCAL_QUORUM vs QUORUM, 当所有数据中心/服务器在物理上都是本地的,在同一个 10gbps 网络上

python - 无法从使用 PyInstaller 构建的 Kivy 应用程序中获取 lexers.PythonLexer()

Python SimpleXMLRPCServer 服务器地址