[ZCM] [ZC] 2066/ 3 Edit "Unicode sent into ZPythonScript_edit"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Sat Apr 8 07:32:51 EDT 2006


Issue #2066 Update (Edit) "Unicode sent into ZPythonScript_edit"
 Status Pending, Zope/bug+solution low
To followup, visit:
  http://www.zope.org/Collectors/Zope/2066

==============================================================
= Edit - Entry #3 by ajung on Apr 8, 2006 7:32 am

 Changes: edited transcript, importance (medium => low)
________________________________________
= Comment - Entry #2 by ajung on Apr 8, 2006 7:32 am

When you talk about errors then *please* provide the full
traceback. If you propose a patch then please include a unittest
that actually checks and demonstrates the intended behavior of the patch.

Btw. Python 2.4 + Zope 2.7.7 is not a supported combination
________________________________________
= Request - Entry #1 by Anonymous User on Apr 8, 2006 7:20 am

Hi all,

I begin to use boa-constructor to edit Zope content, especially Python scripts.
I encountered an exception saying that the "body" object doesn't have the attribute "read()".
It occured in the file /usr/lib/zope/lib/python/Products/PythonScripts/PythonScript.py in the procedure ZPythonScript_edit on the line 149.

I propose a change on the line 148, which stands like:

####################################
if type(body) is not type(''):
####################################

to this code:

####################################
if  type(body) is not type('')\
and type(body) is not type(u''):
####################################

- just for the procedure to accept an unicode object, which was my case.

Thank you all for the great project called Zope.

Cigydd
==============================================================



More information about the Zope-Collector-Monitor mailing list