[ZCM] [ZC] 2066/ 4 Comment "Unicode sent into ZPythonScript_edit"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Sat Apr 8 08:04:06 EDT 2006


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

==============================================================
= Comment - Entry #4 by cigydd on Apr 8, 2006 8:04 am

A bit bureaucratic... Excuse me, I'm a newbie here and I give it up.

I understand that Zope has to have such restrictions in combination with Python versions due to the need security and stability, and that there are rules that I haven't been aware of.

I'm afraid that my report was just for nothing. So I don't actually add any furher information.

Cigydd
________________________________________
= 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