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

TypeError: __init__() got an unexpected keyword argument 'capture_output' #1

Open
shuntera opened this issue Mar 17, 2019 · 2 comments
Assignees

Comments

@shuntera
Copy link

Tried it on my Raspberry Pi and got this error:

sudo ./detect.py 192.168.1.0/24 data.db
Traceback (most recent call last):
File "./detect.py", line 84, in
getNmapScan(sys.argv[1]) #SCAN NETWORK
File "./detect.py", line 34, in getNmapScan
output = subprocess.run(["sudo","nmap","-v","-sn",range,"-oX",filename], capture_output=True)
File "/usr/lib/python3.5/subprocess.py", line 383, in run
with Popen(*popenargs, **kwargs) as process:
TypeError: init() got an unexpected keyword argument 'capture_output'

@harperreed
Copy link

I had the same issue. Turns out that This parameter doesn't exist in python3.6 and below. You will need to upgrade your python to 3.7 and up.

Source:
https://stackoverflow.com/questions/53209127/subprocess-unexpected-keyword-argument-capture-output

@LRA-QC
Copy link
Owner

LRA-QC commented Apr 1, 2019

Thanks harperreed for the follow up. I will try to detect the Python version and implement a work around for Python < 3.7

@LRA-QC LRA-QC self-assigned this Apr 1, 2019
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

3 participants