【问题标题】:pypy: positional and named binds cannot be intermixedpypy:位置绑定和命名绑定不能混用
【发布时间】:2013-07-05 16:40:25
【问题描述】:

我已经使用官方补丁在pypy上成功安装了cx_Oracle。

现在,django 每次都尝试执行任何 sql,我得到:

MyTable.objects.using("ora").count()

Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/user/.virtualenvs/pypy_chembl_migration/site-packages/django/db/models/query.py", line 351, in count
return self.query.get_count(using=self.db)
File "/home/user/.virtualenvs/pypy_chembl_migration/site-packages/django/db/models/sql/query.py", line 418, in get_count
number = obj.get_aggregation(using=using)[None]
File "/home/user/.virtualenvs/pypy_chembl_migration/site-packages/django/db/models/sql/query.py", line 384, in get_aggregation
result = query.get_compiler(using).execute_sql(SINGLE)
File "/home/user/.virtualenvs/pypy_chembl_migration/site-packages/django/db/models/sql/compiler.py", line 818, in execute_sql
cursor.execute(sql, params)
File "/home/user/.virtualenvs/pypy_chembl_migration/site-packages/django/db/backends/oracle/base.py", line 675, in execute
return self.cursor.execute(query, self._param_generator(params))
DatabaseError: positional and named binds cannot be intermixed

谁能告诉我这是什么意思,我做错了什么?

【问题讨论】:

    标签: python django orm pypy cx-oracle


    【解决方案1】:

    这是一个错误报告(您不太可能做错任何事情),不是问题,因此应该转到 http://bugs.pypy.org 而不是这里。

    也就是说,pypy 的 oracle 模块并没有得到很好的维护。欢迎投稿。

    【讨论】:

    • SO 总是一个正确的地方,但我当然会报告这一点,虽然这很困难,因为我在 pypy-dev 的帖子立即被拒绝并且在 IRC 上没有人真正回复......我很想贡献我只需要一些提示!
    猜你喜欢
    • 2020-04-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-29
    • 1970-01-01
    • 1970-01-01
    • 2013-02-04
    相关资源
    最近更新 更多