import sqlite3

Gabriel Genellina gagsl-py2 at
Thu Jun 4 01:53:40 EDT 2009

En Thu, 04 Jun 2009 02:15:39 -0300, willgun <willgun at> escribió:

> Traceback (most recent call last):
>   File "C:\Users\hp\Desktop\SQLite3\", line 2, in <module>
>     import sqlite3
>   File "C:\Users\hp\Desktop\SQLite3\", line 3, in <module>
>     con=sqlite3.connect(r'g:\db1')
> AttributeError: 'module' object has no attribute 'connect'
> Anyone can tell me why?

Your own script is named sqlite3, right? When you execute "import sqlite3"  
you end up importing your own script, not the library module...

Gabriel Genellina

More information about the Python-list mailing list