Witam,
Mimo podania ścieżki do pliku, który chcę odczytać nadal program nie może go odszukać.
file_path = 'C:/Users/mateu/Desktop/Projekty_Python/Pliki_tekstowe/pi_digits.txt'
with open(file_path) as file_object:
contents = file_object.read()
print(contents)
Traceback (most recent call last):
File "C:\Users\mateu\Desktop\Projekty_Python\10. Files and Exceptions\Ćwiczenia\file_reader.py", line 2, in <module>
with open(file_path) as file_object:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/mateu/Desktop/Projekty_Python/Pliki_tekstowe/pi_digits.txt'