They are all in the same category. When I pull up the category, I get
the error "Too many SQL Variables".
Specifically, the problem occurs here:
python manage.py shell>
...
category = Category.objects.get_by_site(slug="myproduct")
product_list = list(category.active_products())
sale = find_best_auto_discount(product_list)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/Satchmo-0.9_2-py2.6.egg/product/utils.py",
line 35, in find_best_auto_discount
if len(discs) > 0:
File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line
81, in __len__
self._result_cache = list(self.iterator())
File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line
269, in iterator
for row in compiler.results_iter():
File "/usr/lib/pymodules/python2.6/django/db/models/sql/compiler.py",
line 672, in results_iter
for rows in self.execute_sql(MULTI):
File "/usr/lib/pymodules/python2.6/django/db/models/sql/compiler.py",
line 727, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/pymodules/python2.6/django/db/backends/util.py", line
15, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/pymodules/python2.6/django/db/backends/sqlite3/base.py",
line 200, in execute
return Database.Cursor.execute(self, query, params)
DatabaseError: too many SQL variables
How would I go about fixing this?
Thanks in advance!
On 9/6/10, satchmo-us...@googlegroups.com
<satchmo-us...@googlegroups.com> wrote:
> =============================================================================
> Today's Topic Summary
> =============================================================================
>
> Group: satchm...@googlegroups.com
> Url: http://groups.google.com/group/satchmo-users/topics
>
> - Users are only able to post one comment each per 'product' [1 Update]
> http://groups.google.com/group/satchmo-users/t/84ba3b812da1bed4
>
>
> =============================================================================
> Topic: Users are only able to post one comment each per 'product'
> Url: http://groups.google.com/group/satchmo-users/t/84ba3b812da1bed4
> =============================================================================
>
> ---------- 1 of 1 ----------
> From: Alex Robbins <alexander...@gmail.com>
> Date: Sep 05 10:16PM -0500
> Url: http://groups.google.com/group/satchmo-users/msg/ddaf6e282babb64f
>
> My guess is that this has something to do with the productratings
> module. I think it makes sure that each user can only rate items one
> time. I don't remember if it uses comment moderation or a signal
> handler. It has been a little while since I looked at the code.
>
> Alex
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Satchmo users" group.
> To post to this group, send email to satchm...@googlegroups.com.
> To unsubscribe from this group, send email to
> satchmo-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/satchmo-users?hl=en.
>
>
"The default setting for SQLITE_MAX_COLUMN is 2000. You can change it
at compile time to values as large as 32767. On the other hand, many
experienced database designers will argue that a well-normalized
database will never need more than 100 columns in a table. "
There are a lot of other limits on that page, maybe you are running
into one of them. I'd switch to mysql now, since you are planning to
do that anyway and see if it fixes it. (PostgreSQL is the new hotness,
you might try it instead, but MySQL works)
Alex
> To unsubscribe from this group, send email to satchmo-user...@googlegroups.com.
To unsubscribe from this group, send email to satchmo-user...@googlegroups.com.