Well, I've figured out one way around this issue.  I did a syncdb on a
clean postgres database, then did a table by table restore of my data
into the new database.  Next I updated all the sequences in the new
database and viola!  Now I can once again accept payments from
customers.  Quite arduous, but it works.


On Sep 5, 12:44 am, Zene <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am getting an error after upgrading my Satchmo installation that has
> me stumped as to how to fix it.  I am using Postgres as my database
> backend, and upon upgrading Satchmo and running the backwards
> incompatible database updates (+ a few that were required but not
> listed) the store works great until trying to check-out. Upon submit
> of credit card information I get the error:
>
> currval of sequence "shop_order_id_seq" is not yet defined in this
> session
>
> Has anyone experienced this error before and perhaps have a fix for
> it?  After considerable searching, per Postgres' documentation 
> (http://www.postgresql.org/docs/8.3/static/functions-sequence.html) it seems
> like Satchmo may be trying to get currval(shop_order_id_seq) before it
> ever does nextval(shop_order_id_seq) which will cause this error.  Or
> I could be totally mistaken.  Any help would be greatly appreciated.
>
> - Here is my traceback as well -
> Environment:
>
> Request Method: POST
> Request URL:https://www.brushesandtools.com/checkout/credit/
> Django Version: 1.0-beta_1-SVN-8546
> Python Version: 2.5.1
> Installed Applications:
> ['django.contrib.admin',
>  'django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.comments',
>  'comment_utils',
>  'django.contrib.sessions',
>  'django.contrib.sitemaps',
>  'django.contrib.sites',
>  'satchmo.caching',
>  'satchmo.configuration',
>  'satchmo.shop',
>  'satchmo.contact',
>  'satchmo.product',
>  'satchmo.shipping',
>  'satchmo.payment',
>  'satchmo.discount',
>  'satchmo.giftcertificate',
>  'satchmo.supplier',
>  'satchmo.thumbnail',
>  'satchmo.l10n',
>  'satchmo.tax']
> 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')
>
> Traceback:
> File "/usr/local/lib/python2.5/site-packages/django/core/handlers/
> base.py" in get_response
>   86.                 response = callback(request, *callback_args,
> **callback_kwargs)
> File "/usr/local/lib/python2.5/site-packages/satchmo/payment/modules/
> authorizenet/views.py" in pay_ship_info
>   5.     return payship.credit_pay_ship_info(request,
> config_get_group('PAYMENT_AUTHORIZENET'))
> File "/usr/local/lib/python2.5/site-packages/satchmo/payment/common/
> views/payship.py" in credit_pay_ship_info
>   147.     return base_pay_ship_info(request, payment_module,
> credit_pay_ship_process_form, template)
> File "/usr/local/lib/python2.5/site-packages/satchmo/payment/common/
> views/payship.py" in base_pay_ship_info
>   138.     results = form_handler(request, contact, working_cart,
> payment_module)
> File "/usr/local/lib/python2.5/site-packages/satchmo/payment/common/
> views/payship.py" in credit_pay_ship_process_form
>   77.             newOrder = get_or_create_order(request,
> working_cart, contact, data)
> File "/usr/local/lib/python2.5/site-packages/satchmo/payment/common/
> views/payship.py" in get_or_create_order
>   38.             shipping=shipping, discount=discount)
> File "/usr/local/lib/python2.5/site-packages/satchmo/payment/common/
> pay_ship.py" in pay_ship_save
>   32.     update_orderitems(new_order, cart, update=update)
> File "/usr/local/lib/python2.5/site-packages/satchmo/payment/common/
> pay_ship.py" in update_orderitems
>   83.         new_order.save()
> File "/usr/local/lib/python2.5/site-packages/satchmo/shop/models.py"
> in save
>   723.         super(Order, self).save() # Call the "real" save()
> method.
> File "/usr/local/lib/python2.5/site-packages/django/db/models/base.py"
> in save
>   282.         self.save_base(force_insert=force_insert,
> force_update=force_update)
> File "/usr/local/lib/python2.5/site-packages/django/db/models/base.py"
> in save_base
>   356.                 result = manager._insert(values,
> return_id=update_pk)
> File "/usr/local/lib/python2.5/site-packages/django/db/models/
> manager.py" in _insert
>   126.         return insert_query(self.model, values, **kwargs)
> File "/usr/local/lib/python2.5/site-packages/django/db/models/
> query.py" in insert_query
>   884.     return query.execute_sql(return_id)
> File "/usr/local/lib/python2.5/site-packages/django/db/models/sql/
> subqueries.py" in execute_sql
>   311.                     self.model._meta.db_table,
> self.model._meta.pk.column)
> File "/usr/local/lib/python2.5/site-packages/django/db/backends/
> postgresql/operations.py" in last_insert_id
>   58.         cursor.execute("SELECT CURRVAL('\"%s_%s_seq\"')" %
> (table_name, pk_name))
> File "/usr/local/lib/python2.5/site-packages/django/db/backends/
> util.py" in execute
>   19.             return self.cursor.execute(sql, params)
>
> Exception Type: OperationalError at /checkout/credit/
> Exception Value: currval of sequence "shop_order_id_seq" is not yet
> defined in this session
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to