У меня проблема в
Код: Выделить всё
VSCodeКод: Выделить всё
"[Errno 2] No such file or directory" error.
Terminal Error Message
The actual path of the file is "E:\Python Learning\Dave Gray tutorials". How do I go about changing the path in the screenshot to matching this one?
I would appreciate it if you could help me figure out what's the best way to create the proper path for future folders.
Right click on folder + Open in integrated terminal works as it gives me the correct path, but it's not desirable given that every other .py in the folder runs just fine within the default terminal.
Here's the code for the file as well:
Код: Выделить всё
import argparse
parser = argparse.ArgumentParser(
description="Provides a personal greeting."
)
parser.add_argument(
"-n", "--name", metavar="name",
required=True, help="The name of the person to greet."
)
args = parser.parse_args()
msg = f"Hello {args.name}!"
print(msg)
The program only ran when I moved the file from its folder to the one mentioned in the terminal error message.
Источник: https://stackoverflow.com/questions/781 ... pythonfile