Hi;
I have the following code:
import MySQLdb
...
user, passwd, db, host = login()
db = MySQLdb.connect(host, user, passwd, 'cart')
cursor= db.cursor()
...
cursor.close()
db = MySQLdb.connect(host, user, passwd, db)
cursor= db.cursor()
Now, python complains about me opening a new connection. But
Victor Subervi wrote:
Hi;
I have the following code:
import MySQLdb
...
user, passwd, db, host = login()
db = MySQLdb.connect(host, user, passwd, 'cart')
cursor= db.cursor()
...
cursor.close()
db = MySQLdb.connect(host, user, passwd, db)
cursor= db.cursor()
Now, python complains
On Mon, Nov 23, 2009 at 9:17 AM, Carsten Haese carsten.ha...@gmail.comwrote:
You thought you did, but did you? The code snippet above doesn't show
any code that closes a database connection.
Would you be so kind as to tell me exactly what code *does* close a
database, then? That would solve
Victor Subervi wrote:
On Mon, Nov 23, 2009 at 9:17 AM, Carsten Haese carsten.ha...@gmail.com
mailto:carsten.ha...@gmail.com wrote:
You thought you did, but did you? The code snippet above doesn't show
any code that closes a database connection.
Would you be so kind as to tell me
On Mon, Nov 23, 2009 at 10:08 AM, Carsten Haese carsten.ha...@gmail.comwrote:
As I said, the best way we can help you is if you copy the actual error
message so that we may diagnose the actual problem and suggest a
solution that fixes the problem.
That gave me the idea that I should simply
Victor Subervi wrote:
On Mon, Nov 23, 2009 at 10:08 AM, Carsten Haese carsten.ha...@gmail.com
mailto:carsten.ha...@gmail.com wrote:
As I said, the best way we can help you is if you copy the actual error
message so that we may diagnose the actual problem and suggest a
solution
On Mon, Nov 23, 2009 at 10:59 AM, Carsten Haese carsten.ha...@gmail.comwrote:
Have you tried to *read* and *understand* this error message? My guess
is no. The error message tells you all you need to know. You need to
pass a string as argument 4, but you aren't. db is a database
connection
Victor Subervi wrote:
A problem occurred in a Python script. Here is the sequence of function
calls leading up to the error, in the order they occurred.
[snip hmtl error report]
Please post plain text - ascii or utf8. On my newsreader, what you
posted, with a mismash of colors, bold,