Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

b'Access denied. Option -c requires administrative privileges

Tags:

python-3.x

I am getting the below error in python when trying to use below line in code:

ping = subprocess.Popen(     ["ping", "-c", "3", host],

error:

b'Access denied. Option -c requires administrative privileges.\r\n..     

I am using Atom IDE and windows 10 laptop. How do I resolve this issue?

like image 459
Venkat Avatar asked Oct 11 '25 09:10

Venkat


1 Answers

You need to use option -n while running the script on Windows. The following will work.

ping = subprocess.Popen(["ping", "-n", "3", host])
like image 135
avanisagar Avatar answered Oct 16 '25 13:10

avanisagar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!