UnboundLocalError (Zope bug?)
Hi, after some modifications in my project the following error occurred (Zope 2.5.1): <!-- Traceback (innermost last): File D:\zope\INTRAE~1\lib\python\ZPublisher\Publish.py, line 150, in publish_module File D:\zope\INTRAE~1\lib\python\ZPublisher\Publish.py, line 114, in publish File D:\zope\INTRAE~1\lib\python\Zope\__init__.py, line 159, in zpublisher_exception_hook (Object: Zope) File D:\zope\INTRAE~1\lib\python\ZPublisher\Publish.py, line 63, in publish File D:\zope\INTRAE~1\lib\python\ZPublisher\HTTPRequest.py, line 640, in processInputs UnboundLocalError: local variable 'new' referenced before assignment --> I don't understand exactly why this code is run in my case, but looking at HTTPRequest.py, line 640, it looks buggy: while not a=='': a=a.split( ":") a,new=':'.join(a[:-1]), a[-1] attr = new If a == '', new is never assigned. Is anyone around who knows what's going on there, and how to fix the bug? tia, Tobias Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das un- erlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
In article <OF3EEA3711.F3B5910E-ONC1256C08.0055918F@LocalDomain> you write:
UnboundLocalError: local variable 'new' referenced before assignment -->
I don't understand exactly why this code is run in my case, but looking at HTTPRequest.py, line 640, it looks buggy:
while not a=='': a=a.split( ":") a,new=':'.join(a[:-1]), a[-1] attr = new
If a == '', new is never assigned. Is anyone around who knows what's going on there, and how to fix the bug?
Yep, it's a bug. Please report it in the Collector: http://collector.zope.org/Zope Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com
participants (2)
-
Florent Guillaume -
THerp@apriori.de