Skip to content

filenotfound error #75

@albinneopraxis

Description

@albinneopraxis

from env_setup import create_firestore_db

firestore_region = "us-central1" # This is already defined in your config.ini
create_firestore_db(firestore_region)

FileNotFoundError Traceback (most recent call last)
Cell In[9], line 4
1 from env_setup import create_firestore_db
3 firestore_region = "us-central1" # This is already defined in your config.ini
----> 4 create_firestore_db(firestore_region)

File ~\Desktop\OpenDataV2\Open_Data_QnA\env_setup.py:448, in create_firestore_db(firestore_region, firestore_database)
441 # Check if Firestore database exists
442 database_exists_cmd = [
443 "gcloud", "firestore", "databases", "list",
444 "--filter", f"name=projects/{PROJECT_ID}/databases/{firestore_database}",
445 "--format", "value(name)" # Extract just the name if found
446 ]
--> 448 database_exists_process = subprocess.run(
449 database_exists_cmd, capture_output=True, text=True
450 )
452 if database_exists_process.returncode == 0 and database_exists_process.stdout:
453 if database_exists_process.stdout.startswith(f"projects/{PROJECT_ID}/databases/{firestore_database}"):

File ~\AppData\Local\Programs\Python\Python312\Lib\subprocess.py:548, in run(input, capture_output, timeout, check, *popenargs, **kwargs)
545 kwargs['stdout'] = PIPE
546 kwargs['stderr'] = PIPE
--> 548 with Popen(*popenargs, **kwargs) as process:
549 try:
550 stdout, stderr = process.communicate(input, timeout=timeout)

File ~\AppData\Local\Programs\Python\Python312\Lib\subprocess.py:1026, 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, process_group)
1022 if self.text_mode:
1023 self.stderr = io.TextIOWrapper(self.stderr,
1024 encoding=encoding, errors=errors)
-> 1026 self._execute_child(args, executable, preexec_fn, close_fds,
1027 pass_fds, cwd, env,
1028 startupinfo, creationflags, shell,
1029 p2cread, p2cwrite,
1030 c2pread, c2pwrite,
1031 errread, errwrite,
1032 restore_signals,
1033 gid, gids, uid, umask,
1034 start_new_session, process_group)
1035 except:
1036 # Cleanup if the child failed starting.
1037 for f in filter(None, (self.stdin, self.stdout, self.stderr)):

File ~\AppData\Local\Programs\Python\Python312\Lib\subprocess.py:1538, 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, unused_process_group)
1536 # Start the process
1537 try:
-> 1538 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
1539 # no special security
1540 None, None,
1541 int(not close_fds),
1542 creationflags,
1543 env,
1544 cwd,
1545 startupinfo)
1546 finally:
1547 # Child is launched. Close the parent's copy of those pipe
1548 # handles that only the child should have open. You need
(...) 1551 # pipe will not close when the child process exits and the
1552 # ReadFile will hang.
1553 self._close_pipe_fds(p2cread, p2cwrite,
1554 c2pread, c2pwrite,
1555 errread, errwrite)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions