pypy: positional and named binds cannot be intermixed

谁都会走 提交于 2019-12-11 08:37:27

问题


I've successfully installed cx_Oracle on pypy using official patch.

Now, everytime, django tries to execute any sql, I'm getting:

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

Can anyone tell me what that means and what am I doing wrong?


回答1:


This is a bug report (you're unlikely doing anything wrong), not a question and as such should go to http://bugs.pypy.org and not here.

That said, pypy's oracle module is not all that well maintained. Contributions welcomed.



来源:https://stackoverflow.com/questions/17493458/pypy-positional-and-named-binds-cannot-be-intermixed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!