I’ve been learning something new recently. I’ve been tortured by all kinds of pits
Background:
I learned from the code in the book, which was written in Python 2.7, while I wrote in Python 3.6
For this error report, it is also divided into grammatical differences. Because in python2.7, it can be executed and no error is reported
Error code:
Error content:
Is such a report error, a variety of Baidu solutions, in fact, did not find a reliable, or finally pieced together to solve it
It’s very simple
The solved code should be:
At first glance, there is no change. In fact, it is not the case. Among them, “strong> () ” is changed to “ [] “, and then it is miraculously normal. This error may also be due to other reasons, which is the case here. For reference only. OK, that’s it
Similar Posts:
- Dbeaver cannot execute database script
- About multi_ image_ Error reporting for picker
- Python pandas.read_ Oserror: initializing from file failed
- [Solved] Typeerror: incorrect padding occurred in python3 Base64 decoding
- How to Solve JSLint Error: Don’t make functions within a loop
- [Solved] 64-bit Python calls 32-bit Oracle client error: Cx_Oracle.DatabaseError: DPI-1047
- SVN commit Issue POST of ‘***/!svn/me’ 403 forbidden
- InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor ‘…
- OSError: [Errno 8] Exec format error: “No such file or directory3” or “/usr/local/bin/python3^M: bad interpreter:…
- When connecting to FTP server, you will be prompted “500 oops: cannot change directory / home / xxx”