[Ironpython-users] question
Gandia Augusto
gandia at arch.ethz.ch
Wed Jul 29 09:56:40 CEST 2015
In this function:
def simxWriteStringStream(clientID, signalName, signalValue, operationMode):
'''
Please have a look at the function description/documentation in the V-REP user manual
'''
sigV=signalValue
if sys.version_info[0] == 3:
if type(signalName) is str:
signalName=signalName.encode('utf-8')
if type(signalValue) is bytearray:
sigV = (ct.c_ubyte*len(signalValue))(*signalValue)
if type(signalValue) is str:
signalValue=signalValue.encode('utf-8')
sigV = (ct.c_ubyte*len(signalValue))(*signalValue)
else:
if type(signalValue) is bytearray:
sigV = (ct.c_ubyte*len(signalValue))(*signalValue)
if type(signalValue) is str:
signalValue=bytearray(signalValue)#<=============================================================HERE IS WHERE I GET THE ERROR
sigV = (ct.c_ubyte*len(signalValue))(*signalValue)
sigV=ct.cast(sigV,ct.POINTER(ct.c_ubyte)) # IronPython needs this
return c_WriteStringStream(clientID, signalName, sigV, len(signalValue), operationMode)
The error I get is :
Program started
Connected to remote API server
Runtime error (TypeErrorException): unicode argument without an encoding
Traceback:
line 1052, in simxWriteStringStream, "C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\programming\remoteApiBindings\python\python\vrep.py"
line 70, in script
Any idea of what this could be?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150729/2dcbf69e/attachment.html>
More information about the Ironpython-users
mailing list