On Thu, Nov 26, 2009 at 5:08 PM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote:
On Thu, 26 Nov 2009 13:32:12 -0500, Victor Subervi
victorsube...@gmail.com declaimed the following in
gmane.comp.python.general:
A problem occurred in a Python script. Here is the sequence of function
calls
On Fri, Nov 27, 2009 at 02:59, Victor Subervi victorsube...@gmail.com wrote:
On Thu, Nov 26, 2009 at 5:08 PM, Dennis Lee Bieber wlfr...@ix.netcom.com
wrote:
Nothing hinting at having
opened an interactive Python console and typing statements into it as an
experiment to see what may work, or
On Fri, Nov 27, 2009 at 9:02 AM, Rami Chowdhury rami.chowdh...@gmail.comwrote:
On Fri, Nov 27, 2009 at 02:59, Victor Subervi victorsube...@gmail.com
wrote:
On Thu, Nov 26, 2009 at 5:08 PM, Dennis Lee Bieber
wlfr...@ix.netcom.com
wrote:
Nothing hinting at having
opened an interactive
Victor Subervi wrote:
The difficulty I am having is that for
some reason it's not inserting. The form inserts the first image but not
the second.
My guess is that you're not calling db.commit() after inserting the
second image. (If you had shown your code, I wouldn't have to guess.)
HTH,
--
On Fri, Nov 27, 2009 at 12:13 PM, Carsten Haese carsten.ha...@gmail.comwrote:
Victor Subervi wrote:
The difficulty I am having is that for
some reason it's not inserting. The form inserts the first image but not
the second.
My guess is that you're not calling db.commit() after inserting
On Fri, Nov 27, 2009 at 1:43 PM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote:
On Fri, 27 Nov 2009 05:59:39 -0500, Victor Subervi
victorsube...@gmail.com declaimed the following in
gmane.comp.python.general:
The following complained that there weren't enough arguments:
for
Victor Subervi wrote:
On Fri, Nov 27, 2009 at 12:13 PM, Carsten Haese carsten.ha...@gmail.com
mailto:carsten.ha...@gmail.com wrote:
Victor Subervi wrote:
The difficulty I am having is that for
some reason it's not inserting. The form inserts the first image
but not
img src=getpic.py?pic=1id=1 width=100/td
img src=getpic.py?pic=1id=2 width=100/td
The problem here is that only one of the images prints on the said page!
However, if I surf to those URLs, the images appear!
Are you sure that you're surfing to *exactly* those URLs? When I go to
Hi;
I have the following code:
import cgitb; cgitb.enable()
import cgi
import MySQLdb
from login import login
user, passwd, db, host = login()
db = MySQLdb.connect(host, user, passwd, db)
cursor= db.cursor()
form = cgi.FieldStorage()
pic1 = form.getfirst('pic1')
cursor.execute('update products
Victor Subervi wrote:
Hi;
I have the following code:
import cgitb; cgitb.enable()
import cgi
import MySQLdb
from login import login
user, passwd, db, host = login()
db = MySQLdb.connect(host, user, passwd, db)
cursor= db.cursor()
form = cgi.FieldStorage()
pic1 = form.getfirst('pic1')
On Thu, Nov 26, 2009 at 10:03 AM, Carsten Haese carsten.ha...@gmail.comwrote:
cursor.execute('update products set pic1=%s where ID=1',
(MySQLdb.Binary(pic1),))
[That comma between the two closing parentheses is not a typo. Do not
leave it out!]
A problem occurred in a Python script. Here
Victor Subervi wrote:
On Thu, Nov 26, 2009 at 10:03 AM, Carsten Haese carsten.ha...@gmail.com
mailto:carsten.ha...@gmail.com wrote:
cursor.execute('update products set pic1=%s where ID=1',
(MySQLdb.Binary(pic1),))
[That comma between the two closing parentheses is not a typo. Do
On Thu, Nov 26, 2009 at 11:52 AM, MRAB pyt...@mrabarnett.plus.com wrote:
Victor Subervi wrote:
On Thu, Nov 26, 2009 at 10:03 AM, Carsten Haese
carsten.ha...@gmail.commailto:
carsten.ha...@gmail.com wrote:
cursor.execute('update products set pic1=%s where ID=1',
On Thu, Nov 26, 2009 at 1:10 PM, Victor Subervi victorsube...@gmail.comwrote:
On Thu, Nov 26, 2009 at 11:52 AM, MRAB pyt...@mrabarnett.plus.com wrote:
Victor Subervi wrote:
On Thu, Nov 26, 2009 at 10:03 AM, Carsten Haese
carsten.ha...@gmail.commailto:
carsten.ha...@gmail.com wrote:
Victor Subervi wrote:
Hang on. Not done yet. The line of code I gave you was just a test case.
The real ones, and the error they threw, follows:
[...]
73 cursor.execute(sql, (MySQLdb.Binary(pics[id]),))
[...]
TypeError: list indices must be integers
args = ('list indices
Victor Subervi wrote:
On Thu, Nov 26, 2009 at 1:10 PM, Victor Subervi victorsube...@gmail.com
mailto:victorsube...@gmail.com wrote:
On Thu, Nov 26, 2009 at 11:52 AM, MRAB pyt...@mrabarnett.plus.com
mailto:pyt...@mrabarnett.plus.com wrote:
Victor Subervi wrote:
On
On Thu, Nov 26, 2009 at 2:12 PM, MRAB pyt...@mrabarnett.plus.com wrote:
Victor Subervi wrote:
On Thu, Nov 26, 2009 at 1:10 PM, Victor Subervi
victorsube...@gmail.commailto:
victorsube...@gmail.com wrote:
On Thu, Nov 26, 2009 at 11:52 AM, MRAB pyt...@mrabarnett.plus.com
17 matches
Mail list logo