Re - Contradictory error messages in Python 3.4 - standard library issue!

Harrison Chudleigh harrison.chudleigh1 at education.nsw.gov.au
Thu Jun 16 18:31:46 EDT 2016


Sorry! I was trying to indent a line and accidentally sent only half of the
message.

As I was saying, I changed the line and reran the program. However, this
produced another group of error messages. One was -
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tokenize.py",
line 438, in open
    encoding, lines = detect_encoding(buffer.readline)
  File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tokenize.py",
line 409, in detect_encoding
    if first.startswith('BOM_UTF8'):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str.
So, first the interpreter says startswith() takes strings, now it says it
takes bytes? What should the module be doing?
This is an error with the standard library of Python 3.4.1, Mac OS X.
*******************************************************************************
This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender.


More information about the Python-list mailing list