logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: query: msg#00083

Subject: Re: query
Federico Di Gregorio wrote:
Il giorno ven, 17/03/2006 alle 21.02 +1000, Timothy Smith ha scritto:
curpg.execute("""SELECT till_name,till_float
   FROM till_config
   JOIN transactions
   USING (id)
   WHERE for_venue = %s""", (Venue,))


Interesting. Try the following code, please:

import psycopg2.extensions

print Venue
print type(Venue)
print psycopg2.extensions.adapt(Venue)

and post the results.

federico

------------------------------------------------------------------------

_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/+sw@xxxxxxxxxxxxxxxx
http://lists.initd.org/mailman/listinfo/psycopg
output as requested

Mad Cow

<type 'unicode'>

Traceback (most recent call last):
 File "DutyShift.py", line 19, in ?
   Main.Main()
File "/usr/home/timothy/Projects/DutyShift/trunk/python/Main.py", line 4163, in Main
   PubWareApp().MainLoop()
File "/usr/local/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/_core.py", line 7473, in __init__
   self._BootstrapApp()
File "/usr/local/lib/python2.4/site-packages/wx-2.6-gtk2-ansi/wx/_core.py", line 7125, in _BootstrapApp
   return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "/usr/home/timothy/Projects/DutyShift/trunk/python/Main.py", line 4135, in OnInit
   frame = MainFrame(None, -1, 'Duty Shift tool - v0.9.7 Beta')
File "/usr/home/timothy/Projects/DutyShift/trunk/python/Main.py", line 3956, in __init__ Return = UpdateSQL.UpdateConfig(self,self.TillDetails,self.RefusedEntry,self.Competitors,self.Reads,self.Venue) File "/usr/home/timothy/Projects/DutyShift/trunk/python/UpdateSQL.py", line 339, in UpdateConfig
   print psycopg2.extensions.adapt(Venue)
psycopg2.InterfaceError: can't encode unicode string to latin-1


<Prev in Thread] Current Thread [Next in Thread>