Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'subject:error': 0.03; 'insert': 0.05; 'explicit': 0.07; 'bytes.': 0.09; 'currently,': 0.09; 'here?': 0.09; 'subject:using': 0.09; 'though...': 0.09; 'runs': 0.10; 'cc:addr:python-list': 0.11; 'charset': 0.16; 'foot': 0.16; 'fork': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'ignored,': 0.16; 'messy': 0.16; 'shooting': 0.16; 'subject:distribution': 0.16; 'unicode.': 0.16; 'wrote:': 0.18; 'module': 0.19; 'thoughts': 0.19; 'cc:addr:python.org': 0.22; 'subject:python.org': 0.24; 'unicode': 0.24; 'fine': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'errors': 0.30; 'especially': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; '(maybe': 0.31; '25,': 0.31; 'there.': 0.32; 'run': 0.32; 'another': 0.32; 'entirely': 0.33; 'fri,': 0.33; "i'd": 0.34; "can't": 0.35; 'something': 0.35; 'test': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'version': 0.36; 'next': 0.36; 'possible': 0.36; 'should': 0.36; 'error.': 0.37; 'problems': 0.38; 'pm,': 0.38; 'anything': 0.39; "you're": 0.61; 'first': 0.61; 'guaranteed': 0.75; 'yourself': 0.78; 'fails,': 0.84; 'risking': 0.84; 'str.': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=sroT2weMH7PSNdfBjnqy8wZZseDG9BB4i/NcHuE7cx0=; b=W9qy7fz25t4zxWR/1mb7BbsaEETzj9DmQ9e4w5lzS8DW1x9MYz905gg7DHf/ghXPbO YHBRIl4iTqNLfOvrQ6twnzbpR34Y37Y7EBuJKR9j4H4BFhk0UeqvDanyBy1TRLdj/ob4 TO5lXpqrg8nSLe7Ob2stz0vEXHor4BKWjsC0AhfthMcgovYcqC2g2pBDI+bSrQmfQw88 RBmfqKc9HC9Un5zIgi4QAGotD0/J3BW0lvJgeIgLt7yo8Tcp4s9H4V71a7ILnOXUm/0Z QZF43kJR/MOzBCTS/nr2ozFDnR/3BuTK4SsGQC4Rz4GM6OGR+HeYSsrdhxxR4ar4B9ya AjAQ== MIME-Version: 1.0 X-Received: by 10.58.123.71 with SMTP id ly7mr6961459veb.11.1398434703629; Fri, 25 Apr 2014 07:05:03 -0700 (PDT) In-Reply-To: References: Date: Sat, 26 Apr 2014 00:05:03 +1000 Subject: Re: MacOS 10.9.2: threading error using python.org 2.7.6 distribution From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1398434710 news.xs4all.nl 2838 [2001:888:2000:d::a6]:35467 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:70593 On Fri, Apr 25, 2014 at 11:43 PM, Matthew Pounsett wrote: > If I insert that object into the test code and run it instead of MyThread= (), I get the error. I can't see anything in there that should cause probl= ems for the threading module though... especially since this runs fine on a= nother system with the same version of python. > > Any thoughts on what's going on here? First culprit I'd look at is the mixing of subprocess and threading. It's entirely possible that something goes messy when you fork from a thread. Separately: You're attempting a very messy charset decode there. You attempt to decode as UTF-8, errors ignored, and if that fails, you log an error... and continue on with the original bytes. You're risking shooting yourself in the foot there; I would recommend you have an explicit fall-back (maybe re-decode as Latin-1??), so the next code is guaranteed to be working with Unicode. Currently, it might get a unicode or a str. ChrisA