Did you install MySQLdb? If so, make sure you are running from
source
since the binary versions will not be able to find it.

massimo


On Jun 27, 10:05 pm, Yannick <[email protected]> wrote:
> Hello mate,
> When using database like MySql with the most recent release of Web2py
> there is an error coming from sql.py saying  "global name 'MySQLdb' is
> not defined".
> Basically all DB connection link other than Sqlite  doesn't work.
>
> db=SQLDB( 'mysql://username:passw...@localhost:3306/database', 10)
>   File "/home/fedora/src/web2py/gluon/sql.py", line 721, in __init__
>     self._pool_connection(lambda : MySQLdb.Connection(
>   File "/home/fedora/src/web2py/gluon/sql.py", line 647, in
> _pool_connection
>     self._connection = f()
>   File "/home/fedora/src/web2py/gluon/sql.py", line 721, in <lambda>
>     self._pool_connection(lambda : MySQLdb.Connection(
> NameError: global name 'MySQLdb' is not defined
>
> Please let me know if you have any question...
>
> Cheers,
> Yannick P.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to