From: David Casti <david@ne...> - 2002-11-14 18:52:38
I am having the strangest problem with PSP.
I have a PSP page which says --
<%@ page imports = "base64:decodestring" %>
fields = req.fields()
message_text = fields[ 'message_text' ]
print decodestring( message_text )
-- and I feed it with a function that looks like --
def web_process( message_text ):
import urllib as u
URL = 'http://localhost/test.htm';
form_fields = dict()
message_text = base64.encodestring( message_text )
form_fields[ 'message_text' ] = message_text
params = u.urlencode( form_fields )
web_handle = u.urlopen( URL, params )
response = web_handle.read()
-- the problem is, the decodestring() function does not do anything. It
returns my string unchanged, not decoded. No exception is raised. If I
call binascii.a2b_base64() directly, I have the same behavior.
If I take the same code out to the command line and run it, on the same box
as the same user, decodestring() does the right thing. encodestring() also
works fine. Only the decodestring() function seems affected, and only from
Any ideas on where to start troubleshooting?
From: David Casti <david@ne...> - 2002-11-15 15:20:06
At 01:52 PM 11/14/2002, webware-discuss@... wrote:
>I am having the strangest problem with PSP. [possessed base64.decodestring
On further isolation, this was not a PSP problem after all. It had to do
with python library corruption on one machine, but not another. Upgrading
everything to 2.2.1 replaced the bad files and I am back in business.