-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Brief description
I'm trying to apply scripts that rely on scapy and include a line from scapy.layers.bluetooth import HCI_Hdr, HCI_PHDR_Hdr which triggers
ImportError: cannot import name 'send' from partially initialized module 'scapy.sendrecv' (most likely due to a circular import) (/usr/local/lib/python3.9/site-packages/scapy/sendrecv.py)
Scapy version
2.4.5
Python version
3.9
Operating system
OS X 11.6
Additional environment information
I attempted both the pip 2.4.5 version and the latest source from github (2.4.5rc1.dev137), with identical results.
How to reproduce
- Open python3
2a. Enterfrom scapy.layers.bluetooth import HCI_Hdr, HCI_PHDR_Hdr
2b. Alternatively, enterfrom scapy.sendrecv import sndrcv
2c. Alternatively, enterfrom scapy.sendrecv import send, sniff
Actual result
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.9/site-packages/scapy/layers/bluetooth.py", line 47, in
from scapy.sendrecv import sndrcv
File "/usr/local/lib/python3.9/site-packages/scapy/sendrecv.py", line 61, in
import scapy.route # noqa: F401
File "/usr/local/lib/python3.9/site-packages/scapy/route.py", line 218, in
conf.route = Route()
File "/usr/local/lib/python3.9/site-packages/scapy/route.py", line 37, in init
self.resync()
File "/usr/local/lib/python3.9/site-packages/scapy/route.py", line 45, in resync
from scapy.arch import read_routes
File "/usr/local/lib/python3.9/site-packages/scapy/arch/init.py", line 124, in
from scapy.arch.bpf.supersocket import * # noqa F403
File "/usr/local/lib/python3.9/site-packages/scapy/arch/bpf/supersocket.py", line 27, in
from scapy.layers.l2 import Loopback
File "/usr/local/lib/python3.9/site-packages/scapy/layers/l2.py", line 17, in
from scapy.ansmachine import AnsweringMachine
File "/usr/local/lib/python3.9/site-packages/scapy/ansmachine.py", line 20, in
from scapy.sendrecv import send, sniff
ImportError: cannot import name 'send' from partially initialized module 'scapy.sendrecv' (most likely due to a circular import) (/usr/local/lib/python3.9/site-packages/scapy/sendrecv.py)
Expected result
No response
Related resources
No response