Message1611

Author additv
Recipients
Date 2007-05-20.20:24:00
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
When using UDP sockets in Jython, calling sendto (socket.py:356) will raise "OverflowError: value too large for byte"
The problematic line is 361:
bytes = jarray.array(map(ord, data), 'b')

This seems to be due to a difference between the results of a call to "ord" and the java defintion of a byte.
Ord returns values between 0 and 255, while a java byte is a value between -128 and 127. 

Thus if a character has an ascii code > 127 this error occurs.
History
Date User Action Args
2008-02-20 17:17:50adminlinkissue1722306 messages
2008-02-20 17:17:50admincreate