cmooredev / RepoReader

Explore and ask questions about a GitHub code repository using OpenAI's GPT.
175 stars 82 forks source link

File Not found Error #8

Open amnpawar opened 9 months ago

amnpawar commented 9 months ago

Hi @cmooredev

![Uploading Error_Screenshot.png…]() I am facing below issue while trying to clone a repository if I define custom local_path as C:/Custom/My_Code

FileNotFoundError: [WinError 2] The system cannot find the file specified

Error_Screenshot

Full Error below


FileNotFoundError Traceback (most recent call last) Cell In[7], line 20 18 print("Failed to clone the repository.") 19 if name == "main": ---> 20 main()

Cell In[7], line 9, in main() 7 local_path="C:/Custom/My_Code" 8 print("Local path",local_path) ----> 9 if clone_github_repo(github_url, local_path): 10 index, documents, file_type_counts, filenames = load_and_index_files(local_path) 11 if index is None:

Cell In[5], line 5, in clone_github_repo(github_url, local_path) 3 try: 4 print("Git path",github_url) ----> 5 subprocess.check_call(["git", "clone", github_url, local_path]) 6 # subprocess.run(['git', 'clone', github_url, local_path], shell=True) 7 print("After subprocess")

File C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py:364, in check_call(*popenargs, kwargs) 354 def check_call(*popenargs, *kwargs): 355 """Run command with arguments. Wait for command to complete. If 356 the exit code was zero then return, otherwise raise 357 CalledProcessError. The CalledProcessError object will have the (...) 362 check_call(["ls", "-l"]) 363 """ --> 364 retcode = call(popenargs, kwargs) 365 if retcode: 366 cmd = kwargs.get("args")

File C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py:345, in call(timeout, *popenargs, kwargs) 337 def call(*popenargs, timeout=None, *kwargs): 338 """Run command with arguments. Wait for command to complete or 339 timeout, then return the returncode attribute. 340 (...) 343 retcode = call(["ls", "-l"]) 344 """ --> 345 with Popen(popenargs, kwargs) as p: 346 try: 347 return p.wait(timeout=timeout)

File C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64qbz5n2kfra8p0\lib\subprocess.py:971, in Popen.init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask, pipesize) 967 if self.text_mode: 968 self.stderr = io.TextIOWrapper(self.stderr, 969 encoding=encoding, errors=errors) --> 971 self._execute_child(args, executable, preexec_fn, close_fds, 972 pass_fds, cwd, env, 973 startupinfo, creationflags, shell, 974 p2cread, p2cwrite, 975 c2pread, c2pwrite, 976 errread, errwrite, 977 restore_signals, 978 gid, gids, uid, umask, 979 start_new_session) 980 except: 981 # Cleanup if the child failed starting. 982 for f in filter(None, (self.stdin, self.stdout, self.stderr)):

File C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py:1456, in Popen._execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session) 1454 # Start the process 1455 try: -> 1456 hp, ht, pid, tid = _winapi.CreateProcess(executable, args, 1457 # no special security 1458 None, None, 1459 int(not close_fds), 1460 creationflags, 1461 env, 1462 cwd, 1463 startupinfo) 1464 finally: 1465 # Child is launched. Close the parent's copy of those pipe 1466 # handles that only the child should have open. You need (...) 1469 # pipe will not close when the child process exits and the 1470 # ReadFile will hang. 1471 self._close_pipe_fds(p2cread, p2cwrite, 1472 c2pread, c2pwrite, 1473 errread, errwrite)

FileNotFoundError: [WinError 2] The system cannot find the file specified