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


Groups > comp.lang.python > #63013

Re: Setuptools - cannot install

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
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; 'argument': 0.05; 'none,': 0.07; "'')": 0.09; 'keys,': 0.09; 'throws': 0.09; 'cc:addr:python- list': 0.11; 'jan': 0.12; '(note': 0.16; '(windows)': 0.16; 'appreciated!': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'iterating': 0.16; 'subject:install': 0.16; 'typeerror:': 0.16; 'wrote:': 0.18; 'module': 0.19; 'commit': 0.19; '>>>': 0.22; 'import': 0.22; 'hack': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'error': 0.23; 'issue,': 0.24; 'looks': 0.24; 'cc:2**0': 0.24; 'least': 0.26; 'skip:" 20': 0.27; 'skip:_ 20': 0.27; 'header:In-Reply-To:1': 0.27; 'url:bugs': 0.29; 'am,': 0.29; 'character': 0.29; 'wonder': 0.29; 'related': 0.29; "doesn't": 0.30; 'characters': 0.30; 'message-id:@mail.gmail.com': 0.30; 'that.': 0.31; '255,': 0.31; 'file': 0.32; 'summary': 0.32; 'open': 0.33; 'url:python': 0.33; 'fri,': 0.33; 'moment': 0.34; 'could': 0.34; 'problem.': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'version': 0.36; 'thanks': 0.36; 'possible': 0.36; 'url:org': 0.36; "couldn't": 0.39; 'is.': 0.60; 'tell': 0.60; 'simply': 0.61; 'more': 0.64; 'worth': 0.66; 'different.': 0.84; 'suspicion': 0.84; 'try.': 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; bh=zLde1LAmBSV5w3L2ZF1hUv1pRbuSbv3ZDMLVnljYyHM=; b=FtBJcH9My1Z98LbzP6n659gPq0y4Rnsbr+OZ8yvIOY2RAdeFuRzzZWXEmPYWg5OViJ 26UIDci0E5XaM87YxTohtO/0kl18Wn9ZkVHFCJAMd+YlxkV6mh3ewhjl70EAmwQgTNnC eNodiZFpnkTasnF+g6ud7LeL1yNe3ajTR4qYaCLwtOoiikjkHep+cJs4jopUb2NtWaOI saYRYee+0o7JOp4eg3Ol4jhSkQ48YfoVKTdBMREfNJ6A66/waGx9H6k2GS0Oq+MNI7PP l0JBnOP+iC9TkpvqNrEWjQfb7TBd3gWstJs0ODWOgVlRrIYm3cLSi7R7t2WWkVvdin4f /9Jw==
MIME-Version 1.0
X-Received by 10.66.154.169 with SMTP id vp9mr6485235pab.39.1388708816440; Thu, 02 Jan 2014 16:26:56 -0800 (PST)
In-Reply-To <6c137d0d-a20c-48c4-9115-f8d2d8134433@googlegroups.com>
References <6c137d0d-a20c-48c4-9115-f8d2d8134433@googlegroups.com>
Date Fri, 3 Jan 2014 11:26:56 +1100
Subject Re: Setuptools - cannot install
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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>
Newsgroups comp.lang.python
Message-ID <mailman.4815.1388708820.18130.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1388708820 news.xs4all.nl 2920 [2001:888:2000:d::a6]:56809
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:63013

Show key headers only | View raw


On Fri, Jan 3, 2014 at 9:26 AM,  <tim.hamza@gmail.com> wrote:
>   File "C:\Python\lib\mimetypes.py", line 255, in read_windows_registry
>     with _winreg.OpenKey(hkcr, subkeyname) as subkey:
> TypeError: OpenKey() argument 2 must be str without null characters or None, not str

Interestingly, I pulled up that file on my 3.3.0 (Windows) and that
line is different. May be related to this issue, which was cited in
the commit summary that effected the change:

http://bugs.python.org/issue15207

In 3.3.0, it looks for HKEY_CLASSES_ROOT plus subkey
r'MIME\Database\Content Type', but in 3.3.3 it's iterating over all
the subkeys in HKEY_CLASSES_ROOT. (Note that _winreg is simply the
winreg module or None if it couldn't be imported.) I wonder is it
possible you have a null character in a key?? It's worth a try.

>>> import winreg
>>> hkcr=winreg.OpenKey(winreg.HKEY_CLASSES_ROOT, '')
>>> for i in range(999999):
    key=winreg.EnumKey(hkcr,i)
    if '\0' in key: print(repr(key))

If that throws a "No more data available" error without printing any
keys, then this isn't your problem.

Alternatively, you could hack C:\Python\lib\mimetypes.py to print out
subkeyname before attempting to open it. That would at least tell you
what the offending key is. My suspicion at the moment is that you may
have a corrupted registry, or else there's something that's possible
that the winreg module doesn't expect.

BTW, thanks for the first-line summary of version numbers. Much
appreciated! So many people don't give that.

ChrisA

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


Thread

Setuptools - cannot install tim.hamza@gmail.com - 2014-01-02 14:26 -0800
  Re: Setuptools - cannot install Chris Angelico <rosuav@gmail.com> - 2014-01-03 11:26 +1100

csiph-web