[Zope-dev] Re: Python warnings behavior and stacklevel=2

Julien Anguenot ja at nuxeo.com
Mon Feb 13 10:48:26 EST 2006


Florent Guillaume wrote:
> Julien Anguenot wrote:
>> Tim Peters wrote:
>>> [Julien Anguenot]
>>>> I'm having some problems with the warnings module behavior.
>>>> (Python-2.4.2 and Zope-2.9 trunk)
>>>>
>>>> [... traceback ... ]
>>>>
>>>>    - Line 71
>>>>   Module zLOG, line 140, in LOG
>>>>   Module warnings, line 61, in warn
>>>>   Module warnings, line 67, in warn_explicit
>>>> TypeError: unsubscriptable object
>>>>
> 
> I've had this too, and I believe it appears if you have a frame
> referencing a python script (or maybe an external method) in the stack.
> 

You'll get the error if you run the CPSDefaul tests against a Zope-2.9
branch, for instance.

	J.

-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20060213/c8869cd5/signature.bin


More information about the Zope-Dev mailing list