Python error: syntax error: encoding problem: utf8
Such as the title.
The first line reported an error, but I have checked the file code, it is indeed utf8.
At this point, use Notepad + + to open the file, and you can see the newline style of the file at the bottom right. (CR LF is windows style, LF is UNIX style)
so I found that the original. Py file is UNIX newline style, because I pulled it from GitHub, and the original author’s environment is probably UNIX.
So the. Py file can be converted to a Windows style line feed.
- Solution to shell script error “expr: syntax error”
- Shell script syntax error near unexpected token ‘$’Do
- Shell script execution error: “syntax error near unexpected token”
- Syntax error: unexpected end of file problem [two solutions]
- How to empty a whole line in latex (simple and effective)
- [turn] right click to open the prompt [shellexecute failed (2): is this command correct? (fix)] with Notepad + +
- Let’s get started with latex 05, line feed, paragraph feed, page feed, first line indent, etc
- Solve syntax error: unexpected end of file or /bin/bash^m: bad interpeneter: no match file or directory
- Notepad + + has no plug-in manager solution
- Installation of Python on MAC
- Solve the problem of syntax error: unexpected end of file or syntax error near unexpected token ` fi ‘error
- Syntax error near unexpected token `newline’script cannot be executed
- python reads csv file is an error _csv.Error: iterator should return strings, not bytes (did you open the file in text)
- Solve the problem of shell script “syntax error near unexpected token `fi’”.
- How Notepad + + displays all characters (for hidden carriage return spaces)
- Parsing the difference between “R” and “RB” patterns of text files (Python)
- Python — magic identify file types
- Python TypeError: ‘newline’ is an invalid keyword argument for this function
- [Python error] using PIP / easy under Windows_ Fail error in launcher: unable to create process using
- The solution of the error code is 2503 in Python installation