Re: [SQLObject] Error with True/False not defined
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Ian B. <ia...@co...> - 2003-07-15 02:50:33
|
I'll change CVS, but you should be able to fix this by adding: True, False = 1==1, 0==1 to the top of Style.py. And any other classes that seem to need it (tell me if you find others). As Edmund said, this doesn't happen with later versions of Python, so I don't know where else it might be a problem. On Mon, 2003-07-14 at 13:58, James Cordiner wrote: > Hi, > > I have just reinstalled 0.4 (and then the CVS version) under Python2.2 > on OS X and can't seem to avoid these errors: > > [ibook:~/Desktop/SQLObject] jcordiner% python > Python 2.2 (#1, 07/14/02, 23:25:09) > [GCC Apple cpp-precomp 6.14] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import SQLObject > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "SQLObject/__init__.py", line 1, in ? > from SQLObject import * > File "SQLObject/SQLObject.py", line 25, in ? > import DBConnection > File "SQLObject/DBConnection.py", line 15, in ? > from Join import sorter > File "SQLObject/Join.py", line 3, in ? > import Style > File "SQLObject/Style.py", line 6, in ? > class Style(object): > File "SQLObject/Style.py", line 15, in Style > def __init__(self, pythonAttrToDBColumn=None, > NameError: name 'False' is not defined > >>> ^D > [ibook:~/Desktop/SQLObject] jcordiner% python tests/test.py > Traceback (most recent call last): > File "tests/test.py", line 150, in ? > class Counter(SQLObject): > File "tests/test.py", line 152, in Counter > _columns = [ > NameError: name 'True' is not defined > > Is this a bug or am I just missing something? Do I need to be copying > the line (True, False = 1==1, 0==1) everywhere into my code? > > Thanks, > jms. > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Parasoft > Error proof Web apps, automate testing & more. > Download & eval WebKing and get a free book. > www.parasoft.com/bulletproofapps1 > _______________________________________________ > sqlobject-discuss mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss |