Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=python.org; s=200901; t=1331178584; bh=rnEIHH8HVCIUwqR2hFxKk/j66siPA7EbIZB2b2Cq4Rs=; h=To:From:Subject:Date:Message-ID:References:Mime-Version: Content-Type:Content-Transfer-Encoding; b=L8z5vrJXQkMJd8TaqY2V/1bk2JQSl2tL0WKangPxlQtp0Un+EUhuAcIhP/1i5CzqL QZGK2KMfbp3C3odSlmZ2WRu6XFWQ/rzb6pCjvrOTVQ3RbZsmm9ckH/XxI0nb7fS9aW Xyju7DLWVz446wJzZzUm53fVr4/L2UQkuTU8ioag= X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'valueerror:': 0.09; 'error:': 0.10; 'exception': 0.12; 'tries': 0.15; 'message-id:@post.gmane.org': 0.16; 'subject:() ': 0.16; 'subject:skip:s 10': 0.18; 'from:addr:python.org': 0.20; 'writes:': 0.25; 'script': 0.28; 'yet': 0.32; 'header:User-Agent:1': 0.33; 'header:X-Complaints- To:1': 0.34; 'rather': 0.34; 'probably': 0.35; 'to:addr:python- list': 0.35; 'received:org': 0.36; 'charset:us-ascii': 0.37; 'using': 0.37; 'some': 0.38; 'to:addr:python.org': 0.40; 'print()': 0.84; 'safest': 0.84; 'sys.stdout.': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Benjamin Peterson Subject: Re: sys.stdout.detach() results in ValueError Date: Thu, 8 Mar 2012 03:49:25 +0000 (UTC) References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 64.131.9.52 (Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331178585 news.xs4all.nl 6845 [2001:888:2000:d::a6]:38673 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21369 Peter Kleiweg xs4all.nl> writes: > Not yet using fp in any way, this script gives the following error: > > Exception ValueError: 'underlying buffer has been detached' in You're probably using print() or some such which tries to write to sys.stdout. It's safest to just write to sys.stdout.buffer rather than using detach.