Closed fbellom closed 2 years ago
Hi @fbellom 👋
I also use macOS Big Sur and Python 3.9 without seeing your problem.
The error message request = ICMPRequest(TypeError: __init__() got an unexpected keyword argument 'privileged'
suggests that you are using an older version of icmplib (the privileged
parameter was introduced in v2 and was therefore not available in v1).
Since you are using the latest version available (3.0.3), I think there is a problem in your imports. Indeed, you mention icmplibv2 which is a fork of my library in version 1 and which is not maintained by myself (by the way, I think it is not even maintained at all).
If that doesn't solve the problem and for further analysis, can you post your code (including imports) and the full exception?
Thanks!
Hi, First of all, thank you for the library. I have been testing
PING
andMultiping
, but it seems the privileged attribute is not working on macOS 11.6.5 with python 3.9.7I'm calling the function as this
hosts = multiping( devices, count=3,interval=0.5,privileged=False)
if I used python as regular user, then I got
PermissionError: [Errno 1] Operation not permitted
no matter if I set ptivileged True or False.
If I try to use
sudo python
(to elevate privilege) then I got this errorrequest = ICMPRequest(TypeError: __init__() got an unexpected keyword argument 'privileged
again it doesn't matter if I passed True or False to the argument.
The same behavior is with
ping
function. With this sentencehost = ping('10.74.200.1', privileged=False)
an error is raised,icmplib.exceptions.SocketPermissionError: Root privileges are required to create the socket
and also ther is no effect on change the privileged argument to True or False.
this are the version installed
Thanks again for any hints to this situation