yoeo / guesslangtools

Tool to build a training dataset for Guesslang, the programming language guesser
MIT License
22 stars 7 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'timeout' #6

Closed AnnLyma closed 2 years ago

AnnLyma commented 2 years ago

When on the step "Download chosen repositories"

I'm hitting the following error:

multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, kwds)) File "/usr/local/lib/python3.9/site-packages/guesslangtools/common.py", line 264, in _apply return method(item, *other_args, *keywords) File "/usr/local/lib/python3.9/site-packages/guesslangtools/workflow/github_repositories.py", line 130, in _clone_repository result = run(command, stdout=PIPE, stderr=PIPE) File "/usr/local/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 505, in run with Popen(popenargs, kwargs) as process: File "/usr/local/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'timeout' """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/bin/gltool", line 8, in sys.exit(main()) File "/usr/local/lib/python3.9/site-packages/guesslangtools/main.py", line 153, in main run_workflow(config) File "/usr/local/lib/python3.9/site-packages/guesslangtools/app.py", line 15, in run_workflow github_repositories.download(config) File "/usr/local/lib/python3.9/site-packages/guesslangtools/common.py", line 175, in wrapped result = func(config, *args, **kw) File "/usr/local/lib/python3.9/site-packages/guesslangtools/workflow/github_repositories.py", line 105, in download for step, row in enumerate(pool_map(_clone_repository, rows, config), 1): File "/usr/local/lib/python3.9/site-packages/guesslangtools/common.py", line 255, in pool_map for result in pool.imap_unordered(_apply, iterable): File "/usr/local/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 870, in next raise value FileNotFoundError: [Errno 2] No such file or directory: 'timeout'

Can it be in any way related to Python 9? I would appreciate suggestions how to fix this

AnnLyma commented 2 years ago

Solved by installing coreutils https://stackoverflow.com/questions/72366051/guesslangtools-filenotfounderror-errno-2-no-such-file-or-directory-timeout/72366419#72366419