ValueError: not enough values to unpack (expected 2, got 0)

ValueError: not enough values to unpack (Expected 2, got 0) sometimes appears when reading TXT files. The reason I found myself is that there are several blank lines at the end of the TXT file. Delete the last blank line and make sure that the last line is the text you want to read. The TXT file looks like nothing if you press Enter at the end, but those empty lines actually have one character, the newline \n, so there can be no empty lines.
 

Just like that the blank line between the cursor and the text actually has a newline character on each line.
Click Backspace to go back to your last line of text. Press the direction key of the keyboard cursor can not get down.

Read More: