所以我只是想得到建议的查询(
domain = whois.query("google.com")
)正在工作。但每当我运行它时,我都会得到以下回溯:
File "file.py", line x, in weight_sources
domain = whois.query("google.com")
File "C:\Users\User Name\Anaconda3\lib\site-packages\whois\__init__.py", line 50, in query
pd = do_parse(do_query(d, force, cache_file, slow_down, ignore_returncode), tld)
File "C:\Users\User Name\Anaconda3\lib\site-packages\whois\_1_query.py", line 44, in do_query
_do_whois_query(dl, ignore_returncode),
File "C:\Users\User Name\Anaconda3\lib\site-packages\whois\_1_query.py", line 58, in _do_whois_query
p = subprocess.Popen(['whois', '.'.join(dl)], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
File "C:\Users\User Name\Anaconda3\lib\subprocess.py", line 856, in __init__
restore_signals, start_new_session)
File "C:\Users\User Name\Anaconda3\lib\subprocess.py", line 1111, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
我看到一些其他问题/答案指向中的1111行
subprocess
,但我认为问题可能在
whois
正如我所用
子流程
在我的设备上完全没有错误。因为不存在的文件似乎与
是谁
包裹,我认为这个问题与
this one
,尽管两者可能有关联?
本质上,是否有任何解决此错误的方法,或者是否需要编辑
是谁
包裹代码,我该怎么办?我甚至不能完全理解“文件”丢失了什么。。。