There is no way for Scapy to guess the first layer of your packet, so you need to specify it.
You can do so by using the appropriate Packet
subclass. For example, say your packet's first layer is Ethernet, use Ether(raw_packet)
instead of Packet(raw_packet)
.