IsADirectoryError

Somebody please help me with this error

[code removed - moderator]

Hi @pyaj,

Copy the contents of the file named src to a file named dst. It looks like you are trying to copy a file to a directory instead of a file. What you need to do is to include TRAINING+i as destination.

Best,

Thank you for your reply, it should work now but I am getting a new error: no such file

[code removed - moderator]

Hi @pyaj,

Would you mind just paste the code instead of the images?

It’s easier to check :slight_smile:

[code removed - moderator]

Hi @pyaj,

I believe there’s some problems when you created the directories. Base dir points to /tmp2, you defined some variables that are mixed up later…

[code removed - moderator]

Thank you very much. It works now!

[code removed - moderator]

It’s still showing the ‘No such file or directory’ error for me

Hi @HarshulGaba,

That piece of code works in @pyaj lab. Issue was that folder structure created earlier was incorrect. In your particular case, I would suggest to review that part of the code instead.

Best,

Hi @HarshulGaba, I finally used this code to make it work, good luck!

[code removed - moderator]

1 Like

Got it guys! Thanks. Also, can someone help me with a course or something that can cover all the background knowledge about python needed for this course. Like, I know quite a bit of python but I don’t know oop and some other bits and pieces here and there.

I have the same error, “No such file or directory”. I tried my own code as well as @german.mesa 's and @pyaj 's code, and I got the same error regardless.

EDIT: I closed and re-opened the window and everything worked.

It doesn’t work at me, the output say → name ‘source’ is not defined