[Zope] tracebacks

Tom Deprez tom.deprez@uz.kuleuven.ac.be
Tue, 01 Aug 2000 15:20:53 +0200


>A) your SQL is wrong, you want a VARCHAR not a CHAR there.  and i doubt
>'NOW' is a valid value for a TIMESTAMP type in your DB.  You'll be wanting a
>SQL function like Date(), not a string.  Probably.  Look in your DB docs.
>Not that I'm much of a SQL person - someone else will probably correct me.  

I'm using an Interbase database. You can use CHAR and VARCHAR. The last one
is a variable char, while the first has a fixed length. Anyway, this was
just an example out of my head to explain what I'm experiencing. 'NOW' can
be used in Interbase as it will insert the current date&time when a value
is not given for a record. (Although, I'm not sure it will work through
Zope, I'm just curious :-) ). Anyway, '12/07/2000' should work.

>B) Now why you'd get a pickling error when you've got bad SQL i don't know -
>and 'cannot pickle objects' is a blantant lie.  Surely that's what
>pickling's all about. 

MY_NAME VARCHAR(20) DEFAULT 'tom', gives the same error. And yes, it's
strange that I get an error with a default literal value. Could it be that
Zope handles the tom in 'tom' as a python expresion or something?

>Anyway you read the traceback from bottom to top.
>The error occured on line 348 of Connection.py, which threw an error in
>Transaction.py, blah blah, which threw an error in Publish.py, which caused
>Zope to exit the publisher and print the stack trace.

Thanks Seb, this is what I wanted to know about the traceback.


Tom.
>> -----Original Message-----
>> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Tom
>> Deprez
>> Sent: 01 August 2000 12:41
>> To: zope@zope.org
>> Subject: [Zope] tracebacks
>> 
>> 
>> Hi,
>> 
>> Can somebody explain me how you can use the given tracebacks 
>> to find the
>> possible error? For example, I get the following error and I know what
>> causes it, but I don't know where I must go to find the 
>> code-line where the
>> error starts:
>> 
>> I get the following error when I use a table in which a field 
>> is defined
>> with a default string value. 
>> 
>> eg :
>> 
>> MY_NAME CHAR(20) DEFAULT 'tom'
>> MY_DATE TIMESTAMP DEFAULT '6/07/2000'
>> MY_DATE TIMESTAMP DEFAULT 'NOW'
>> 
>> ---
>> Zope Error
>> Zope has encountered an error while publishing this resource. 
>> 
>> Error Type: cPickle.PicklingError
>> Error Value: Cannot pickle objects.
>> ---
>> 
>> <!--
>> Traceback (innermost last):
>>   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in
>> publish_module
>>   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 
>> 187, in publish
>>   File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in
>> zpublisher_exception_hook
>>   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 
>> 175, in publish
>>   File /usr/local/zope/lib/python/Zope/__init__.py, line 235, 
>> in commit
>>   File /usr/local/zope/lib/python/ZODB/Transaction.py, line 
>> 251, in commit
>>   File /usr/local/zope/lib/python/ZODB/Connection.py, line 
>> 348, in commit
>>     (Info: (('Products.ZnolkSQLWizard.Wizard', 'ZnolkSQLWizard'),
>> '\000\000\000\000\000\000\015\025', ''))
>> cPickle.PicklingError: (see above)
>> 
>> -->
>> 
>> 
>> Thanks for any advice.
>> 
>> Tom
>> 
>> _______________________________________________
>> Zope maillist  -  Zope@zope.org
>> http://lists.zope.org/mailman/listinfo/zope
>> **   No cross posts or HTML encoding!  **
>> (Related lists - 
>>  http://lists.zope.org/mailman/listinfo/zope-announce
>>  http://lists.zope.org/mailman/listinfo/zope-dev )
>> 
>> 
>