durusmail: quixote-users: Strange NoneType errors
Strange NoneType errors
2004-07-02
2004-07-02
2004-07-02
Strange NoneType errors
Andy Todd
2004-07-02
Neil Schemenauer wrote:
> I suspect this is an import problem.  There is a bug in Quixote's
> import hooks whereby importing a non-existent module will give None
> rather than raising an import error.
>
>   Neil
> _______________________________________________
> Quixote-users mailing list
> Quixote-users@mems-exchange.org
> http://mail.mems-exchange.org/mailman/listinfo/quixote-users

It could be. The problem does not appear when I only import the module
once. It is triggered by the second import, and then only on my Mac.

It may be a Gadfly problem, it doesn't always like multiple processes
accessing the same database. But that would cause an error on my Debian
machine as well, and it doesn't.

The __init__ method in my Database class is simply;

     def __init__(self, dbName, dbDir):
         self._db = gadfly.gadfly(dbName, dbDir)
         self._cursor = self._db.cursor()

As I say, this is not a problem in the interactive interpreter on either
of my machines or using Quixote under Debian, but does occur with
Quixote through Apache on Mac OSX 10.3

The only difference is running Quixote 1.0c1 on my Mac on 0.6.1 on my
Debian machine.

Regards,
Andy
--
--------------------------------------------------------------------------------
 From the desk of Andrew J Todd esq - http://www.halfcooked.com/

reply