I had this problem when inserting strings values with unicode characteres.
Try to use your_object.field = unicode(your_string) on all strings fields
before save the object.

On Thu, Sep 10, 2009 at 11:48 AM, Corey Oordt <[email protected]> wrote:

>
> I have had this problem as well, and discovered that it is a bug in
> psycopg2.
>
> If you have multiple sites on the same server, using the same
> psycopg2, you will run into this error.
>
> I successfully fixed it by running my sites using mod_wsgi in daemon
> mode and using virtualenv.
>
> I highly recommend the approach.
>
> Yours,
>
> Corey
>
> On Sep 10, 2009, at 9:35 AM, Günter Walser wrote:
>
> >
> > I don't think it’s the configuration.
> >
> > I suggest you open home/newt/django/1.0/lib/django/db/models/sql/
> > query.py,
> > Go to line 2369 and insert print 'The SQL:\n, sql;  print 'The
> > Parameters:\n, params
> > Statements.
> >
> > Then you analyze your parameters if there is a strange value when
> > the error
> > happens, eg None values or similar strangeness's which aren't
> > accepted by
> > PostgreSQL.
> >
> > And if you find something strange you track where it comes from,
> > maybe from
> > line
> > number = obj.get_aggregation()[None] which can be seen in your
> > traceback.
> >
> > Hope this might help to narrow down the root cause,
> >
> > Rgds
> > Günter
> >
> > -----Ursprüngliche Nachricht-----
> > Von: [email protected] [mailto:satchmo-
> > [email protected]]
> > Im Auftrag von Newt
> > Gesendet: Donnerstag, 10. September 2009 15:07
> > An: Satchmo users
> > Betreff: Re: Annoying can't adapt problem
> >
> >
> > I use postgresql with psycopg2, mod_python on ubuntu 8.04
> >
> > I'll try with other databases.
> >
> > Is there any known issue with this configuration?
> >
> > Ales
> >
> >
> > On Sep 9, 4:19 pm, Chris Moffitt <[email protected]> wrote:
> >> Which database are you using? If you try sqlite for testing
> >> purposes, do
> > you
> >> see the same thing?
> >>
> >> -Chris
> >>
> >> On Wed, Sep 9, 2009 at 2:46 AM, Newt <[email protected]> wrote:
> >>
> >>> Hello,
> >>
> >>> has anyone encoutered problem when you get the 'can't adapt' error
> >>> when checking out (steps 2 and 3)??
> >>> it's problem on satchmo 8.1 with both django 1.0 and 1.1
> >>> it happens just sometimes, so refreshing page helps. I went through
> >>> the critical lines and all seem to be fine.
> >>
> >>> I'll upgrade to satchmo 0.9+ soon, but until then I have to get this
> >>> running.
> >>
> >>>  File "/home/newt/django/1.0/lib/satchmo/payment/forms.py", line 43,
> >>> in _get_shipping_choices
> >>>    if method.valid():
> >>
> >>>  File "/home/newt/django/1.0/lib/satchmo/shipping/modules/tiered/
> >>> models.py", line 86, in valid
> >>>    price = self.cost()
> >>
> >>>  File "/home/newt/django/1.0/lib/satchmo/shipping/modules/tiered/
> >>> models.py", line 51, in cost
> >>>    return self.carrier.price(total)
> >>
> >>>  File "/home/newt/django/1.0/lib/satchmo/shipping/modules/tiered/
> >>> models.py", line 188, in price
> >>>    if not prices.count() > 0:
> >>
> >>>  File "/home/newt/django/1.0/lib/django/db/models/query.py", line
> >>> 292, in count
> >>>    return self.query.get_count()
> >>
> >>>  File "/home/newt/django/1.0/lib/django/db/models/sql/query.py",
> >>> line
> >>> 376, in get_count
> >>>    number = obj.get_aggregation()[None]
> >>
> >>>  File "/home/newt/django/1.0/lib/django/db/models/sql/query.py",
> >>> line
> >>> 348, in get_aggregation
> >>>    result = query.execute_sql(SINGLE)
> >>
> >>>  File "/home/newt/django/1.0/lib/django/db/models/sql/query.py",
> >>> line
> >>> 2369, in execute_sql
> >>>    cursor.execute(sql, params)
> >>
> >>> ProgrammingError: can't adapt
> >>
> >>> Thanks for your help,
> >>
> >>> Ales
> >
> >
> > >
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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