私はいつもこのエラーが発生していますTypeError: not all arguments converted during string formatting
これが私のクエリです
State.objects.raw('...review_create_date between %s and %s group by error_type',[fromdate,todate])
ここfromdate=2011-05-21
とtodate='2011-05-27'
上記のクエリは mysql プロンプトで実行されますが、python シェルでは実行できませんでした
誰か助けてください
トレースバックはこちら
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 1412, in __iter__
query = iter(self.query)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.py", line 73, in __iter__
self._execute_query()
File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.py", line 87, in _execute_query
self.cursor.execute(self.sql, self.params)
File "/usr/local/lib/python2.6/dist-packages/django/db/backends/util.py", line 18, in execute
sql = self.db.ops.last_executed_query(self.cursor, sql, params)
File "/usr/local/lib/python2.6/dist-packages/django/db/backends/__init__.py", line 216, in last_executed_query
return smart_unicode(sql) % u_params
TypeError: not all arguments converted during string formatting