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


Groups > comp.lang.python > #110037

Contradictory error messages in Python 3.4 - standard library issue!

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Harrison Chudleigh <harrison.chudleigh1@education.nsw.gov.au>
Newsgroups comp.lang.python
Subject Contradictory error messages in Python 3.4 - standard library issue!
Date Fri, 17 Jun 2016 08:25:20 +1000
Lines 16
Message-ID <mailman.96.1466116456.2288.python-list@python.org> (permalink)
References <CACMigy3DREGfAe=3SDacYkaPX90=wqp1N5T93DCzHpwqD54Y=g@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset="utf-8"
Content-Transfer-Encoding base64
X-Trace news.uni-berlin.de EFf7pNkPdyIfBqyuw3xa6gckuadYztvVogxXC/gnb5eQ==
Return-Path <harrison.chudleigh1@education.nsw.gov.au>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'arg': 0.09; 'str,': 0.09; 'subject:library': 0.09; 'subject:messages': 0.09; 'tuple': 0.09; 'typeerror:': 0.09; 'subject:error': 0.11; 'read:': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'skip:" 70': 0.16; 'subject:issue': 0.16; 'tokenize': 0.16; 'bytes': 0.18; 'module': 0.25; 'error': 0.27; 'message-id:@mail.gmail.com': 0.27; 'str': 0.29; 'program,': 0.29; 'addressee': 0.32; 'changed': 0.33; 'received:com.au': 0.33; 'file': 0.34; 'skip:d 20': 0.34; 'received:google.com': 0.35; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'received:10': 0.37; 'received:209': 0.38; 'delete': 0.38; 'to:addr:python.org': 0.40; 'received:58': 0.61; 'information': 0.63; 'skip:* 70': 0.70; 'skip:& 80': 0.91
X-FW-MsgID <06/17/16-08:25:22-5176663@obesa3.dec.local>
IronPort-PHdr 9a23:qGRDAh//H9zCbv9uRHKM819IXTAuvvDOBiVQ1KB91e0cTK2v8tzYMVDF4r011RmSDdSdu6MP0rSempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+lS8iC3o/uiaibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwu3cYh/V0799cUaL8OqA5VqBwFCU6M2czosrxukrtVwyKs1sVSH8XiR1OSyPF8R3+U5b+smOutuNnwiiBOsuwRrApVTCv7qhrETflhDoMPiI492eRjNdvyq1cvlSoukoskMbvfIiJOa8mLevmdtQASD8ZUw==
X-IronPort-Anti-Spam-Filtered true
X-IronPort-Anti-Spam-Result A2DeAgBGJmNX/8XZVdFeHQGDIFZ9Bo0knD4BkHOBehIIhyQHOBQBAQEBAQEBAWQnQRIBgV2CESIRdAEHNwIkEgEFAVeIDqBDgUcBP4ExPjGLO5EBEI9wgjWCWgWYbwKGBYgkgWlOhzGFOo42Eh6BDx42gTcMAUEfgV4qMoQmhVUBAQE
X-IPAS-Result A2DeAgBGJmNX/8XZVdFeHQGDIFZ9Bo0knD4BkHOBehIIhyQHOBQBAQEBAQEBAWQnQRIBgV2CESIRdAEHNwIkEgEFAVeIDqBDgUcBP4ExPjGLO5EBEI9wgjWCWgWYbwKGBYgkgWlOhzGFOo42Eh6BDx42gTcMAUEfgV4qMoQmhVUBAQE
X-IronPort-AV E=Sophos;i="5.26,481,1459778400"; d="scan'208,217";a="5176663"
X-DET-UID obesa3.dec.local-6-5176663
X-Original-Envelope-From harrison.chudleigh1@education.nsw.gov.au
X-Original-Envelope-To python-list@python.org
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=oT3v6KAroopXyAilEm3n0BQ3DBVQSFfkssKDsKogClQ=; b=Mq8TJInBfJDa6Dx42TjTtIXH/xgj9IcALSs5tavErrvEvQyDnLqLop7+pFrWsnJLIj 438yhDysELct1L4BK6Ku2qMT5DnC/68Dk0VQf/WJs0JfMx0h2oZ7lyYusBO/sqRE04Vm FZzwQ8ZDHTYwS16ua/h9WJV3v4Yq0e2x93esFaaq2sclWZ99izBQgZCPqnEy1CtGmJMM 9DNArbkv06eamveHsigFrhH94QQaopOCLYOLhkFJ5TJbniKixQyDdnz+dn2qGiKFGmAE 0H76BaW604WoaS3Sk3M9fCxsIDn/TbvjTVcNZ5FlDyoQ+hR1aNEBzFipGUtiyZMwFqKo EJFw==
X-Gm-Message-State ALyK8tK6wF3vXmMA5Lv3O47zmoWHoS0IbAHL2L3M2Rnq971OQK1GsL8IiBKmHxd5P/Yla29dOX7OdhdMcXfe7hB7XL6CziDcE9+RE+nPFVAJ9+uT6zbtwfLKA7fGfPhXaQggndy56A0jATGBhec9SmkCGrgoEOs6pCYedjvegeD5UE0X
X-Received by 10.194.120.135 with SMTP id lc7mr1567405wjb.34.1466115920480; Thu, 16 Jun 2016 15:25:20 -0700 (PDT)
X-Received by 10.194.120.135 with SMTP id lc7mr1567392wjb.34.1466115920165; Thu, 16 Jun 2016 15:25:20 -0700 (PDT)
X-Content-Filtered-By Mailman/MimeDel 2.1.22
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <CACMigy3DREGfAe=3SDacYkaPX90=wqp1N5T93DCzHpwqD54Y=g@mail.gmail.com>
Xref csiph.com comp.lang.python:110037

Show key headers only | View raw


While working on a program, I ran into an error with the usage of the
module tokenize. The following message was displayed.
 File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tokenize.py",
line 467, in tokenize
    encoding, consumed = detect_encoding(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 str or a tuple of str, not bytes
Undaunted, I changed the error on line 409. The line then read:

if first.startswith(BOM_UTF8):
*******************************************************************************
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

Contradictory error messages in Python 3.4 - standard library issue! Harrison Chudleigh <harrison.chudleigh1@education.nsw.gov.au> - 2016-06-17 08:25 +1000
  Re: Contradictory error messages in Python 3.4 - standard library issue! Steven D'Aprano <steve@pearwood.info> - 2016-06-17 11:58 +1000

csiph-web