You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/vasiligulevich/.vscode/extensions/ms-python.python-2023.18.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
cli.main()
File "/Users/vasiligulevich/.vscode/extensions/ms-python.python-2023.18.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/Users/vasiligulevich/.vscode/extensions/ms-python.python-2023.18.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
runpy.run_path(target, run_name="__main__")
File "/Users/vasiligulevich/.vscode/extensions/ms-python.python-2023.18.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
File "/Users/vasiligulevich/.vscode/extensions/ms-python.python-2023.18.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/Users/vasiligulevich/.vscode/extensions/ms-python.python-2023.18.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "/Users/vasiligulevich/git/private_scripts/monitor_network.py", line 31, in <module>
if check_host('192.168.1.1'):
File "/Users/vasiligulevich/git/private_scripts/monitor_network.py", line 18, in check_host
result = ping(host)
File "/Users/vasiligulevich/Library/Python/3.9/lib/python/site-packages/ping3/__init__.py", line 83, in wrapper
func_return = func(*args, **kwargs)
File "/Users/vasiligulevich/Library/Python/3.9/lib/python/site-packages/ping3/__init__.py", line 310, in ping
send_one_ping(sock=sock, dest_addr=dest_addr, icmp_id=icmp_id, seq=seq, size=size)
File "/Users/vasiligulevich/Library/Python/3.9/lib/python/site-packages/ping3/__init__.py", line 83, in wrapper
func_return = func(*args, **kwargs)
File "/Users/vasiligulevich/Library/Python/3.9/lib/python/site-packages/ping3/__init__.py", line 176, in send_one_ping
sock.sendto(packet, (dest_addr, 0)) # addr = (ip, port). Port is 0 respectively the OS default behavior will be used.
OSError: [Errno 65] No route to host
The text was updated successfully, but these errors were encountered:
The EXCEPTION switch only affects PingError exceptions, such as TTL expired, Destination Unreachable, etc. These errors are usually reported by the packets that are received, except for Timeout. The OSError exceptions, such as permission denied or WIFI disconnected, should be handled by the ping3 user, not by ping3 itself.
I hope my explanation has clarified the situation and resolved your concern. If you agree with me, I will close this issue as solved. However, if you still have a different opinion or any questions, please feel free to discuss with me.
I use ping for connectivity check. It feels strange, that I get inconsistent behavior between a routing failure on a remote host and on local host. I expect a library to hide the low level details from me, when I do connectivity check (unlike exceptions mode, where details are expected and requested).
Test steps
Expected result:
False
Actual result
The text was updated successfully, but these errors were encountered: