Perfect solution ValueError: invalid literal for int () with base 10 error issues (do only add notes)

Self-adhesive ( https://blog.csdn.net/septwolves2015/article/details/78831137 ) (lessons learned: file problem is a problem can be opened with notepad ++ observe whether there are special characters )


Text found in more than three invisible characters \ xef \ xbb \ xbf, then know that this is a text file BOM head, then removed the three characters NOTEPAD ++, is not being given.

Specific operation is as follows:

1, open the file in a notepad ++

2, select "encoding" option in the menu bar, in the drop-down menu, select "UTF8 without BOM format encoded"

3, save

Run the program again, the problem is solved,

If the character is not read the file, print repr (variable) look, you know the content of the data, filtering out special characters on OK.
---------------------
Author: septwolves2015
Source: CSDN
Original: https: //blog.csdn.net/septwolves2015/article/details/78831137
Disclaimer: This article as a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin www.cnblogs.com/sunmoon1993/p/11021687.html