[issue23371] mimetypes initialization fails on Windows because of TypeError

2016-04-02 Thread Berker Peksag

Berker Peksag added the comment:

This is a duplicate of issue 22028 (fixed in 2.7 in 7c4c4e43c452).

--
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Python 3.4.1 Installer ended prematurely (Windows msi)

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23371] mimetypes initialization fails on Windows because of TypeError

2015-02-01 Thread Stéphane Lenclud

New submission from Stéphane Lenclud:

On my Windows 7 installation mimetypes.py in read_windows_registry 
_winreg.OpenKey can throw a TypeError exception which is not handled and 
interrupts the execution.

To fix it I added:
except TypeError:
continue

To reproduce it I just need to run te following:
c:\python27\python -c import mimetypes; mimetypes.init()

This error is obviously due to the content of my registry.
The subkeyname causing issues have names like: 
{hexid-hexid-hexid-hexid-hexid}

--
components: Windows
messages: 235179
nosy: Slion, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: mimetypes initialization fails on Windows because of TypeError
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23371
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23371] mimetypes initialization fails on Windows because of TypeError

2015-02-01 Thread Stéphane Lenclud

Stéphane Lenclud added the comment:

I don't think so.
Here is the traceback btw:
  File setup.py, line 18, in module
exec(init_file.read(), command_ns)
  File string, line 11, in module
  File 
c:\users\sl\appdata\local\temp\tmpoaaddk\setuptools-12.0.5\setuptools\__init__.py,
 line 11, in module
from setuptools.extension import Extension
  File 
c:\users\sl\appdata\local\temp\tmpoaaddk\setuptools-12.0.5\setuptools\extension.py,
 line 8, in module
from .dist import _get_unpatched
  File 
c:\users\sl\appdata\local\temp\tmpoaaddk\setuptools-12.0.5\setuptools\dist.py,
 line 16, in module
from setuptools.depends import Require
  File 
c:\users\sl\appdata\local\temp\tmpoaaddk\setuptools-12.0.5\setuptools\depends.py,
 line 6, in module
from setuptools import compat
  File 
c:\users\sl\appdata\local\temp\tmpoaaddk\setuptools-12.0.5\setuptools\compat.py,
 line 19, in module
from SimpleHTTPServer import SimpleHTTPRequestHandler
  File C:\Python27\lib\SimpleHTTPServer.py, line 27, in module
class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
  File C:\Python27\lib\SimpleHTTPServer.py, line 214, in 
SimpleHTTPRequestHandler
mimetypes.init() # try to read system mime.types
  File C:\Python27\lib\mimetypes.py, line 351, in init
db.read_windows_registry()
  File C:\Python27\lib\mimetypes.py, line 254, in read_windows_registry
with _winreg.OpenKey(hkcr, subkeyname) as subkey:
TypeError: must be string without null bytes or None, not str
Something went wrong during the installation.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23371
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23371] mimetypes initialization fails on Windows because of TypeError

2015-02-01 Thread Steve Dower

Steve Dower added the comment:

Definitely a dup, though I don't have the number handy. There's a patch on the 
other issue waiting for a mimetypes maintainer to step up.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23371
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23371] mimetypes initialization fails on Windows because of TypeError

2015-02-01 Thread R. David Murray

R. David Murray added the comment:

Is this a duplicate of issue 9291?

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23371
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23371] mimetypes initialization fails on Windows because of TypeError

2015-02-01 Thread Tim Golden

Tim Golden added the comment:

It's right there on my to-do list which is, unfortunately, not getting 
any shorter.

TJG

On 01/02/2015 19:10, Steve Dower wrote:

 Steve Dower added the comment:

 Definitely a dup, though I don't have the number handy. There's a patch on 
 the other issue waiting for a mimetypes maintainer to step up.

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue23371
 ___


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23371
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com