pypy: positional and named binds cannot be intermi

2019-08-04 12:24发布

问题:

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.