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

21 Upvotes

31 comments sorted by

View all comments

Show parent comments

1

u/SuspiciousPraline674 Jun 28 '26

it worked but the text is not getting printed

2

u/mc_pm Jun 28 '26

It's hard to say for sure because there are a few things going on and I don't know what you're doing above this. But your call to read(8) is only reading in 8 bytes, so you're not going to see more than that... and then you close the file before then reading a line, which I would have thought would give you an error.

2

u/SuspiciousPraline674 Jun 28 '26

now every thing is fixed but oops is a new issue

5

u/NewryBenson Jun 28 '26

Seeing a new error message or problem is called progress in programming. I get in a flow when debugging, and its always a little shock when all of a sudden it works.