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

ImportError: cannot import name 'send' from partially initialized module 'scapy.sendrecv' (most likely due to a circular import) #25

Open
boluobaowangzi opened this issue Oct 26, 2021 · 1 comment
Assignees

Comments

@boluobaowangzi
Copy link

thrift-tool --port 9090 --pcap-file ~/share.pcap dump --show-all --pretty

Traceback (most recent call last):
File "/Users/hq/Library/Python/3.8/bin/thrift-tool", line 11, in
from thrift_tools.tool import main
File "/Users/hq/Library/Python/3.8/lib/python/site-packages/thrift_tools/tool.py", line 13, in
from .message_sniffer import MessageSnifferOptions, MessageSniffer
File "/Users/hq/Library/Python/3.8/lib/python/site-packages/thrift_tools/message_sniffer.py", line 8, in
from .sniffer import Sniffer
File "/Users/hq/Library/Python/3.8/lib/python/site-packages/thrift_tools/sniffer.py", line 13, in
from scapy.sendrecv import sniff
File "/Users/hq/Library/Python/3.8/lib/python/site-packages/scapy/sendrecv.py", line 61, in
import scapy.route # noqa: F401
File "/Users/hq/Library/Python/3.8/lib/python/site-packages/scapy/route.py", line 218, in
conf.route = Route()
File "/Users/hq/Library/Python/3.8/lib/python/site-packages/scapy/route.py", line 37, in init
self.resync()
File "/Users/hq/Library/Python/3.8/lib/python/site-packages/scapy/route.py", line 45, in resync
from scapy.arch import read_routes
File "/Users/hq/Library/Python/3.8/lib/python/site-packages/scapy/arch/init.py", line 124, in
from scapy.arch.bpf.supersocket import * # noqa F403
File "/Users/hq/Library/Python/3.8/lib/python/site-packages/scapy/arch/bpf/supersocket.py", line 27, in
from scapy.layers.l2 import Loopback
File "/Users/hq/Library/Python/3.8/lib/python/site-packages/scapy/layers/l2.py", line 17, in
from scapy.ansmachine import AnsweringMachine
File "/Users/hq/Library/Python/3.8/lib/python/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) (/Users/hq/Library/Python/3.8/lib/python/site-packages/scapy/sendrecv.py)

@boluobaowangzi
Copy link
Author

boluobaowangzi commented Oct 29, 2021

下载最新的scapy包,到自己类库中
git clone https://github.com/secdev/scapy.git
cd scapy
cp -r scapy ~/Library/Python/2.7/lib/python/site-packages/
运行环境使用python2.7

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