problem with simple insert(newbie)
uno dos <refreegrata-/[email protected]> Tue, 25 May 2010 13:16:45 -0700 (PDT)
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============9163556044100120426==
Content-Type: multipart/alternative; boundary="0-987786936-1274818605=:23736"
--0-987786936-1274818605=:23736
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hello list.
In first place, i want a say that i'm a newbie with python and psycopg2. Th=
at is the=A0 reason of this simple question.
I never used "psycopg2" before, and now i have problems with a simple sente=
nce.
When i do this:
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 asdas =3D 'asdas'
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 self.__cursor.execute("insert into tabla =
(informacion) VALUES (%s);",(asdas))
Python throw the exception "<type 'exceptions.Exception'>not all arguments =
converted during string formatting"
Somebody know what is the problem?
that's all, thanks for read, and sorry for my poor english(i speak spanish)
=0A=0A=0A
--0-987786936-1274818605=:23736
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<table cellspacing=3D"0" cellpadding=3D"0" border=3D"0" ><tr><td valign=3D"=
top" style=3D"font: inherit;">Hello list.<br>In first place, i want a say t=
hat i'm a newbie with python and psycopg2. That is the reason of this=
simple question.<br>I never used "psycopg2" before, and now i have problem=
s with a simple sentence.<br><br>When i do this:<br>  =
; asdas =3D 'asdas'<br> &nbs=
p; self.__cursor.exec=
ute("insert into tabla (informacion) VALUES (%s);",(asdas))<br><br>Python t=
hrow the exception "<span style=3D"font-style: italic;"><type 'exception=
s.Exception'>not all arguments converted during string formatting</span>=
"<br><br>Somebody know what is the problem?<br><br>that's all, thanks for r=
ead, and sorry for my poor english(i speak spanish)<br><br></td></tr></tabl=
e><br>=0A=0A=0A=0A=0A=0A=0A=0A
--0-987786936-1274818605=:23736--
--===============9163556044100120426==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/psycopg
--===============9163556044100120426==--