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.
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: https://stackoverflow.com/questions/36016207/how-to-solve-unicodedecodeerror-when-reading-file-with-danish-characters
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.
Yes this seems to work. Thank you.
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.