Skip to content
Advertisement

what could cause this error : FileNotFoundError: [Errno 2] No such file or directory

I’m very new to coding and Python so I’m really confused by this error. Here’s my code from an exercise where I need to find the most used word into a directory with multiples files:

JavaScript

Here’s the error I get:

JavaScript

What could cause this kind of error?

Advertisement

Answer

here’s what i guet

JavaScript

what could cause this kind of error ?

The most likely cause for this error is that there is no such file or directory, i.e. that the file or directory /Users/k/files/Code/exo does not exist.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement