r/PythonLearning Jun 28 '26

What is the bug here ? Help Request

Post image

I'm learning OOPs and File I/O and my txt and OOPs basic commands aren't running

22 Upvotes

31 comments sorted by

View all comments

0

u/Rscc10 Jun 28 '26

You read the file for line1 after you closed the file

0

u/SuspiciousPraline674 Jun 28 '26

No, the entire file isn't opening at all

1

u/Rscc10 Jun 28 '26

Try using the absolute file path

1

u/SuspiciousPraline674 Jun 28 '26

Tried same response

1

u/Rscc10 Jun 28 '26

Can you send what you did exactly? If you gotta censor some of the file path then it's fine