/usr/lib/python3.9/site-packages/scapy/fields.py in addfield(self, pkt, s, ival)
2167 v = 0
2168 v <<= self.size
-> 2169 v |= val & ((1 << self.size) - 1)
2170 bitsdone += self.size
2171 while bitsdone >= 8:
TypeError: unsupported operand type(s) for &: 'float' and 'int'
https://docs.python.org/3/howto/pyporting.html#division
Error without this change in Python 3 is: