Cannot run a single MySQLdb execute....
ameyer2 at yahoo.com
Thu Mar 28 21:54:55 CET 2013
On 3/27/2013 11:50 PM, Νίκος Γκρ33κ wrote:
> I'am about to go nuts with python 3.2.3
> Do you see somehtign wrong with the following statement?
> cur.execute( '''SELECT hits FROM counters WHERE url = ?''', (page,) )
> data = cur.fetchone()
> because as you can see by visiting my webpage at http://superhost.gr it produces an error and i dont have aclue why.
> Please help. i'am using MySQLdb
When I try to connect to that web page I see the following error message:
"ImportError: No module named pymysql "
If that's what you're getting, there's nothing wrong with your SQL or
your cur.execute statement. The problem is that the web server is not
finding the pymysql module.
Is pymysql installed on the computer that is running your application?
Can the web server module find it?
I must be missing something because, if that's the problem, your object
named "cur" could not have been created successfully. Maybe what I'm
seeing is a new problem?
More information about the Python-list