Errors creating product variations

6 views
Skip to first unread message

Peter Baumgartner

unread,
Nov 18, 2008, 6:52:40 PM11/18/08
to satchm...@googlegroups.com
I've got a new Satchmo setup running r1706 and the bug fixes Django
1.0 branch on PostgreSQL. I created my first product, but encountered
some errors (below). Just to be sure, I dropped the DB and started
over with these instructions (
http://www.satchmoproject.com/docs/svn/new_installation.html#test-and-install-the-data
), but got the same errors

Adding variations:
--------------------------

Environment:

Request Method: GET
Request URL: http://mysite.com/product/admin/stripe-jacket/variations/
Django Version: 1.0-final-SVN-unknown
Python Version: 2.5.1
Installed Applications:
['django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.comments',
'django.contrib.markup',
'comment_utils',
'django.contrib.sitemaps',
'satchmo.caching',
'satchmo.configuration',
'satchmo.shop',
'satchmo.contact',
'satchmo.product',
'satchmo.shipping',
'satchmo.payment',
'satchmo.discount',
'satchmo.giftcertificate',
'satchmo.supplier',
'satchmo.thumbnail',
'sorl.thumbnail',
'satchmo.l10n',
'satchmo.tax',
'satchmo.recentlist',
'satchmo.productratings',
'mysite.cos_tags']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
'satchmo.shop.SSLMiddleware.SSLRedirect',
'satchmo.recentlist.middleware.RecentProductMiddleware')


Traceback:
File "/django/virtualenv/mysite.com/lib/python2.5/site-packages/django/core/handlers/base.py"
in get_response
86. response = callback(request, *callback_args,
**callback_kwargs)
File "/django/virtualenv/mysite.com/lib/python2.5/site-packages/django/contrib/auth/decorators.py"
in __call__
67. return self.view_func(request, *args, **kwargs)
File "/django/virtualenv/mysite.com/lib/python2.5/site-packages/satchmo/product/adminviews.py"
in variation_manager
135. form = VariationManagerForm(product=product)
File "/django/virtualenv/mysite.com/lib/python2.5/site-packages/satchmo/product/forms.py"
in __init__
427. variation =
configurableproduct.get_product_from_options(opts)
File "/django/virtualenv/mysite.com/lib/python2.5/site-packages/satchmo/product/models.py"
in get_product_from_options
1131. pv = self._variation_cache.get(options, None)

Exception Type: TypeError at /product/admin/stripe-jacket/variations/
Exception Value: set objects are unhashable


And when trying to add a variation:
--------------------------------------------------

Environment:

Request Method: POST
Request URL: http://mysite.com/admin/product/productvariation/add/
Django Version: 1.0-final-SVN-unknown
Python Version: 2.5.1
Installed Applications:
['django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.comments',
'django.contrib.markup',
'comment_utils',
'django.contrib.sitemaps',
'satchmo.caching',
'satchmo.configuration',
'satchmo.shop',
'satchmo.contact',
'satchmo.product',
'satchmo.shipping',
'satchmo.payment',
'satchmo.discount',
'satchmo.giftcertificate',
'satchmo.supplier',
'satchmo.thumbnail',
'sorl.thumbnail',
'satchmo.l10n',
'satchmo.tax',
'satchmo.recentlist',
'satchmo.productratings',
'mysite.cos_tags']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
'satchmo.shop.SSLMiddleware.SSLRedirect',
'satchmo.recentlist.middleware.RecentProductMiddleware')


Traceback:
File "/django/virtualenv/mysite.com/lib/python2.5/site-packages/django/core/handlers/base.py"
in get_response
86. response = callback(request, *callback_args,
**callback_kwargs)

Exception Type: TransactionManagementError at
/admin/product/productvariation/add/
Exception Value: Transaction managed block ended with pending COMMIT/ROLLBACK


And here is the postgresql log:
--------------------------------------------

2008-11-18 16:48:12 MST ERROR: insert or update on table
"product_productvariation_options" violates foreign key constraint
"product_productvariation_options_productvariation_id_fkey"
2008-11-18 16:48:12 MST DETAIL: Key (productvariation_id)=(1) is not
present in table "product_productvariation".
2008-11-18 16:48:12 MST STATEMENT: END
2008-11-18 16:48:12 MST WARNING: there is no transaction in progress


I have confirmed that both the product_productvariation_options and
product_productvariation tables are empty.

Thanks for the help!

--
Pete

joshm

unread,
Nov 18, 2008, 7:19:58 PM11/18/08
to Satchmo users
This is the same issue I posted in the post prior to this one.

Try updating your code, I think it was fixed this morning in 1708 or
1709.

On Nov 18, 3:52 pm, "Peter Baumgartner" <sgt.hu...@gmail.com> wrote:
> I've got a new Satchmo setup running r1706 and the bug fixes Django
> 1.0 branch on PostgreSQL. I created my first product, but encountered
> some errors (below). Just to be sure, I dropped the DB and started
> over with these instructions (http://www.satchmoproject.com/docs/svn/new_installation.html#test-and...

joshm

unread,
Nov 18, 2008, 10:45:35 PM11/18/08
to Satchmo users
But I think your second error is still happening as well...
Reply all
Reply to author
Forward
0 new messages