Cannot run a single MySQLdb execute....

Νίκος Γκρ33κ nikos.gr33k at gmail.com
Fri Mar 29 08:40:00 CET 2013


Τη Πέμπτη, 28 Μαρτίου 2013 10:54:55 μ.μ. UTC+2, ο χρήστης Alan Meyer έγραψε:
> 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
> 
> >
> 
> Nikos,
> 
> 
> 
> 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?
> 
> 
> 
>      Alan

Hello Ala, well nto this is not the error, i uses to had MySQLdb as a conenctor but even withat that i still see a blank webpage without no errros. Then i had a suspision that perhaps MySQLdb isnt't supported in Python 3.2.3 so i decided to try pymysql but it wasnt there.

I asked at hstgator support to install that module for me since iam not familiar with linux very much or pip but i got this response just now.


Click here to rate this response.
>
> Hello again,
>
> Per your request, a virtual environment has been created for you. You can find local Python binaries in:
>
> /home/nikos/bin
>
> Unfortunately the pymysql module cannot be installed using pip or easy_install and must be installed manually. There is no indication that this module in any way requires Python 3. Is there a particular reason you must use Python 3 instead of a version which supports the modules that you need? Given that the modules you need are better supported by earlier versions of Python, it's not clear to me why we're trying to use Python 3 instead.
>
> If you would still like us to proceed with manually installing the pymysql module for the local version of Python under the nikos account, we will be happy to give it a try but there will be a one-time charge of $35.00 for the installation. I would recommend using an earlier version of Python which is compatible with the modules that you need, but it is certainly up to you. Please let us know how you would like to proceed. 

So, just to make sure that MySQLdb isnt causeing the probkem can someone, perhaps you that is familiar with linxu conenct to my jailed shell account and install manually the 'pymysql' module because i dont know how to do it and i cannot afford to pay ath linux admin because iam unemployed.

please i can providr ou with user and pass for my jailed shell access for someone ti install it manually.



More information about the Python-list mailing list