Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throws integer error when installed and using python2.7 #21

Closed
bnvk opened this issue Feb 17, 2018 · 1 comment
Closed

throws integer error when installed and using python2.7 #21

bnvk opened this issue Feb 17, 2018 · 1 comment

Comments

@bnvk
Copy link

bnvk commented Feb 17, 2018

Traceback (most recent call last):
File "/usr/local/sbin/dhcpcanon", line 11, in
load_entry_point('dhcpcanon==0.8.0', 'console_scripts', 'dhcpcanon')()
File "/usr/local/lib/python2.7/dist-packages/dhcpcanon-0.8.0-py2.7.egg/dhcpcanon/dhcpcanon.py", line 89, in main
dhcpcap.run()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/automaton.py", line 899, in run
six.reraise(c.exc_info[0], c.exc_info[1], c.exc_info[2])
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/automaton.py", line 743, in _do_control
state = next(iterator)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/automaton.py", line 813, in _do_iter
self._run_condition(timeout_func, *state_output)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/automaton.py", line 694, in _run_condition
action(self, *state_req.action_args, **state_req.action_kargs)
File "/usr/local/lib/python2.7/dist-packages/dhcpcanon-0.8.0-py2.7.egg/dhcpcanon/dhcpcapfsm.py", line 646, in action_transmit_discover
self.send_discover()
File "/usr/local/lib/python2.7/dist-packages/dhcpcanon-0.8.0-py2.7.egg/dhcpcanon/dhcpcapfsm.py", line 154, in send_discover
sendp(pkt)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/sendrecv.py", line 304, in sendp
verbose=verbose, realtime=realtime, return_packets=return_packets)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/sendrecv.py", line 265, in __gen_send
s.send(p)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/arch/linux.py", line 545, in send
return SuperSocket.send(self, x)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/supersocket.py", line 42, in send
sx = raw(x)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/compat.py", line 72, in raw
return x.bytes()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 338, in bytes
return self.build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 436, in build
p = self.do_build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 421, in do_build
pay = self.do_build_payload()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 408, in do_build_payload
return self.payload.do_build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 421, in do_build
pay = self.do_build_payload()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 408, in do_build_payload
return self.payload.do_build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 421, in do_build
pay = self.do_build_payload()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 408, in do_build_payload
return self.payload.do_build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 421, in do_build
pay = self.do_build_payload()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 408, in do_build_payload
return self.payload.do_build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 418, in do_build
pkt = self.self_build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 399, in self_build
p = f.addfield(self, p, val)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/fields.py", line 408, in addfield
return s + self.i2m(pkt, val)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/layers/dhcp.py", line 269, in i2m
lval = [f.addfield(pkt,b"",f.any2i(pkt,val)) for val in lval]
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/fields.py", line 732, in addfield
s = self.field.addfield(pkt, s, v)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/fields.py", line 80, in addfield
return s+struct.pack(self.fmt, self.i2m(pkt,val))
struct.error: cannot convert argument to integer

@juga0
Copy link
Owner

juga0 commented Feb 18, 2018

Thanks @bnvk for reporting this bug.
I'm removing support for python 2, 23cdeee installs and uses python 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants