Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #110038

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

From Harrison Chudleigh <harrison.chudleigh1@education.nsw.gov.au>
Newsgroups comp.lang.python
Subject Re - Contradictory error messages in Python 3.4 - standard library issue!
Date 2016-06-17 08:31 +1000
Message-ID <mailman.97.1466116754.2288.python-list@python.org> (permalink)
References <CACMigy3kHPbh1hb=wAF1-YjLqYMvQF1hJsP6vL0-7oNpmfOaAA@mail.gmail.com>

Show all headers | View raw


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.

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re - Contradictory error messages in Python 3.4 - standard library issue! Harrison Chudleigh <harrison.chudleigh1@education.nsw.gov.au> - 2016-06-17 08:31 +1000
  Re: Re - Contradictory error messages in Python 3.4 - standard library issue! Ned Batchelder <ned@nedbatchelder.com> - 2016-06-16 16:03 -0700

csiph-web