import sqlite3

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Thu Jun 4 01:53:40 EDT 2009


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

> Traceback (most recent call last):
>   File "C:\Users\hp\Desktop\SQLite3\sqlite3.py", line 2, in <module>
>     import sqlite3
>   File "C:\Users\hp\Desktop\SQLite3\sqlite3.py", 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