net.py is my sample application to set the ip address of my eth0 interface. I get the following error while running the application.
Traceback (most recent call last):
File "net.py", line 119, in
inf.set_ip("192.168.7.59");
File "/usr/lib/python3.5/site-packages/pynetlinux/ifconfig.py", line 210, in set_ip
ifreq = struct.pack('16sH2s4s8s', self.name, AF_INET, '\x00'*2, ipbytes, '\x00'*8)
struct.error: argument for 's' must be a bytes object
Please help me with the error.