Not able to read a file

It showing error while executing the code.

After I give the command to “read” the file, there is no error. But when I give the command to print “output”, there is no output. Where can I be going wrong?

It seems there’s no error, can you let me know about which particular cell it is?

Can you share the code snippet?

Can you please share “poem.txt”.


I have got the same unicode decode error. The error is not consistent. At times the error is not thrown, the output is not executed and displayed. It is just blank. I’m attaching the link to error script here.

Error message

Ditto. Exactly the same thing is happening with me.

This error is coming because we copy and paste the poem from the google. it will be resolved if we know how to read csv file as what i learnt from little bit of research. It may be true. Iam not sure about it.
I learnt from here:
I have done this by writing the poem in notepad not copyimg it from google. You have to do a little bit of extra work to write the entire poem.

1 Like

Yes this seems to work. Thank you.

1 Like

Yes. Got it.

Also, earlier I converted a “doc” file to a “txt” as I did not have notepad in my Apple laptop. Installed notepad for MacBook and typed the entire poem in notepad. The code is now working. Thank you.

Please keep the thread open, incase someone comes up with an alternative solution wherein the typing of the poem can be avoided.


1 Like