On Tue, 2006-04-04 at 12:52 -0700, Nathaniel Irons wrote:
> On Mon, Apr 03, 2006 at 10:47:42PM +0000, Mike Gee wrote:
> 
> > I, too, am suffering from the AssertionError.
> 
> Apparently Trac is looking for a python module called "sqlite", and
> its failure to find it triggers the assertion error. However, the
> pysqlite test imports from a module called "pysqlite2".
> 
> The pysqlite tests fake up a module called sqlite. This is from
> dbpi.py in the 2.1.3 distribution:
> 
>   import pysqlite2.dbapi2 as sqlite
> 
> What's the deal here? Should I expect that "import sqlite" entered
> into a python interpreter (with access to the same site-packages
> directory as Trac) should fail? If it does fail, as it does in my
> case, does that indicate pysqlite2 was not properly installed?

"import sqlite" will only work if you've installed a pysqlite 1.x
version.  With version 2 the module is typically imported with an alias
as you found above.  Trac will attempt both ways of importing pysqlite
and will raise the assertion error you mentioned if both fail.

-- 
Matthew Good <[EMAIL PROTECTED]>

_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac

Reply via email to