[Trac] 'module' object has no attribute 'connect'
Matthew Gillen
mgillen at bbn.com
Fri Jun 10 10:10:12 CDT 2005
> On Jun 10, 2005, at 10:45 AM, Eric Coleman wrote:
>
>>> How do I check which version of these I have, and how do I go about
>>> removing them?
rpm -e py-sqlite # remove package
rpm -q py-sqlite # show version number
rpm -ql py-sqlite # show all files installed by that rpm
>>> Also, what's the best installation to do? should I build them from
>>> source?
>>>
>>> Sorry if they are stupid questions.. im kind of a moron
>>>
>>> - Eric
>>>
>>> Jeffrey E. Forcier wrote:
>>>
>>>> You probably don't have the right version of py-sqlite, I had the
>>>> same error a week ago, and after investigation it seems there are
>>>> two fairly different versions of that library.
>>>>
>>>> Now, I'm using DarwinPorts on Mac OS X, so I don't know if this is
>>>> their fault or the upstream maintainers' fault, but in case it's
>>>> the latter, I'll explain the problem I had.
>>>>
>>>> In my package list I have *two* oddly-named/versioned instances of
>>>> py- sqlite, as follows:
>>>>
>>>> py-sqlite python/py-sqlite 2.0.3 python database extension
>>>> for sqlite
>>>> py-sqlite2 python/py-sqlite2 1.0.1 python database
>>>> extension for sqlite2
>>>>
>>>> Further confusing the matter is that there's two versions of SQLite
>>>> itself:
>>>>
>>>> sqlite databases/sqlite 2.8.15 an embedded SQL database engine
>>>> sqlite3 databases/sqlite3 3.2.1 an embedded SQL database
>>>> engine
>>>>
>>>> Anyway, what Trac appears to expect is SQLite 2.x with py-sqlite2 1.x.
>>>>
>>>> The difference is that py-sqlite2 implements the Python Database
>>>> API 2.0 (PEP 249, http://www.python.org/peps/pep-0249.html) which
>>>> is what the Trac python code uses, and py-sqlite does not. So,
>>>> you're probably using py-sqlite, which doesn't have a
>>>> 'pysqlite.connect()' function, thus generating the error you see.
>>>>
>>>>
>>>> I hope this helps instead of just being a bunch of junk :)
>>>>
>>>> Regards,
>>>> Jeff
>>>>
More information about the Trac
mailing list