Unpacking the structures

S

smilesonisamal

Hi all,
While performing the packing/unpacking of xdr structures of rpc I get an error as following.


x = struct.unpack('>L', data)[0] struct.error: unpack requires a string argument of length 4.

Can anybody help me in this regard?

I checked the following link:
http://docs.python.org/2/library/xdrlib.html
But there is no way to packing/unpacking the structure data type.

Regards
Pradeep
 
D

Dan Stromberg

Hi all,
While performing the packing/unpacking of xdr structures of rpc I get an error as following.


x = struct.unpack('>L', data)[0] struct.error: unpack requires a string argument of length 4.

Can anybody help me in this regard?

What does print(len(data)) say?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top