[Zope] SQLSession problem

Jochen Haeberle listen@MIDRAS.de
Fri, 11 Feb 2000 12:17:56 +0100


Hi,

I am stuck with Anthonys SQlSession. I followed the HowTo on Using
SQLSession by Miklos, trying to avoid the typos (too many
"Session"/"Sessions", Miklos :-) and got set up using Gadfly. But
after adding about 4 items to the list I get a Traceback:

Error Type: LexTokenError
Error Value: Lexical token not found near :: "w',\012 'bah',\012 
"*"'KGxwMQpTJ2RmZ2"

Traceback (innermost last):
   File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/Publish.py, line 
214, in publish_module
   File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/Publish.py, line 
179, in publish
   File /serve/MIS-Zope-2.1.3/lib/python/Zope/__init__.py, line 202, 
in zpublisher_exception_hook
     (Object: ElementWithAttributes)
   File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/Publish.py, line 
165, in publish
   File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/mapply.py, line 
160, in mapply
     (Object: listCreator)
   File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/Publish.py, line 
102, in call_object
     (Object: listCreator)
   File /serve/MIS-Zope-2.1.3/lib/python/OFS/DTMLDocument.py, line 
166, in __call__
     (Object: listCreator)
   File 
/serve/MIS-Zope-2.1.3/lib/python/DocumentTemplate/DT_String.py, line 
502, in __call__
     (Object: listCreator)
   File /serve/MIS-Zope-2.1.3/lib/python/DocumentTemplate/DT_Let.py, 
line 145, in render
     (Object: lt="SESSION[listName]")
   File /serve/MIS-Zope-2.1.3/lib/python/DocumentTemplate/DT_Util.py, 
line 335, in eval
     (Object: SESSION.set(listName,lt))
     (Info: listName)
   File <string>, line 0, in ?
   File 
/serve/MIS-Zope-2.1.3/lib/python/Products/SQLSession/SQLSession.py, 
line 111, in __setitem__
   File /serve/MIS-Zope-2.1.3/lib/python/Shared/DC/ZRDB/DA.py, line 
405, in __call__
     (Object: sqlSetValue)
   File /serve/MIS-Zope-2.1.3/lib/python/Products/ZGadflyDA/db.py, 
line 178, in query
   File 
/serve/MIS-Zope-2.1.3/lib/python/Products/ZGadflyDA/gadfly/gadfly.py, 
line 322, in execute
   File 
/serve/MIS-Zope-2.1.3/lib/python/Products/ZGadflyDA/gadfly/kjParser.py 
, line 1175, in DoParse1
   File 
/serve/MIS-Zope-2.1.3/lib/python/Products/ZGadflyDA/gadfly/kjParser.py 
, line 1167, in DoParse
   File 
/serve/MIS-Zope-2.1.3/lib/python/Products/ZGadflyDA/gadfly/kjParser.py 
, line 832, in GO
   File 
/serve/MIS-Zope-2.1.3/lib/python/Products/ZGadflyDA/gadfly/kjParser.py 
, line 725, in DoOneReduction
   File 
/serve/MIS-Zope-2.1.3/lib/python/Products/ZGadflyDA/gadfly/kjParser.py 
, line 562, in getmember
   File 
/serve/MIS-Zope-2.1.3/lib/python/Products/ZGadflyDA/gadfly/kjParser.py 
, line 427, in Token
LexTokenError: (see above)

I thought, they all warn you about using Gadfly for serious things 
anyway so I retried it with MySQL. But the same happened but with a 
different error:

Error Type: Error
Error Value: Incorrect padding

Traceback (innermost last):
   File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/Publish.py, line 
214, in publish_module
   File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/Publish.py, line 
179, in publish
   File /serve/MIS-Zope-2.1.3/lib/python/Zope/__init__.py, line 202, 
in zpublisher_exception_hook
     (Object: ElementWithAttributes)
   File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/Publish.py, line 
165, in publish
   File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/mapply.py, line 
160, in mapply
     (Object: listCreator)
   File /serve/MIS-Zope-2.1.3/lib/python/ZPublisher/Publish.py, line 
102, in call_object
     (Object: listCreator)
   File /serve/MIS-Zope-2.1.3/lib/python/OFS/DTMLDocument.py, line 
166, in __call__
     (Object: listCreator)
   File 
/serve/MIS-Zope-2.1.3/lib/python/DocumentTemplate/DT_String.py, line 
502, in __call__
     (Object: listCreator)
   File /serve/MIS-Zope-2.1.3/lib/python/DocumentTemplate/DT_Let.py, 
line 144, in render
     (Object: lt="SESSION[listName]")
   File /serve/MIS-Zope-2.1.3/lib/python/DocumentTemplate/DT_Util.py, 
line 335, in eval
     (Object: SESSION[listName])
     (Info: listName)
   File <string>, line 0, in ?
   File /serve/MIS-Zope-2.1.3/lib/python/DocumentTemplate/DT_Util.py, 
line 161, in careful_getitem
   File 
/serve/MIS-Zope-2.1.3/lib/python/Products/SQLSession/SQLSession.py, 
line 99, in __getitem__
   File 
/serve/MIS-Zope-2.1.3/lib/python/Products/SQLSession/SQLSession.py, 
line 51, in base64oneline_load
   File /usr/lib/python1.5/base64.py, line 46, in decodestring
   File /usr/lib/python1.5/base64.py, line 32, in decode
Error: (see above)


I guess it has to do with the length of the list. If you only use
small items, you can add/change more before the error occurs.
As the definition of the SQL-Table only contains Varchars, I don't
know why this happens. And then this is not really a SQL-Error
popping up, on the other hand the error message changes depending on
the BackEnd db...

If anyone wants to try::

Gadfly: <http://mona.midras.de:8080/SessionTest1>
MySQL: <http://mona.midras.de:8080/SessionTest2>

Jochen