After seeing the following stacktrace from a django/python application I requested an export of a user's registry;
Traceback (most recent call last): File "django_offline\networkaccessmanager.pyc", line 69, in createRequest File "django\contrib\staticfiles\handlers.pyc", line 58, in get_response File "django\contrib\staticfiles\handlers.pyc", line 51, in serve File "django\contrib\staticfiles\views.pyc", line 41, in serve File "django\views\static.pyc", line 57, in serve File "mimetypes.pyc", line 294, in guess_type File "mimetypes.pyc", line 355, in init File "mimetypes.pyc", line 259, in read_windows_registry File "mimetypes.pyc", line 249, in enum_types UnicodeDecodeError: 'ascii' codec can't decode byte 0xa9 in position 28: ordinal not in range(128)
The python from mimetypes;
def enum_types(mimedb): i = 0 while True: try: ctype = _winreg.EnumKey(mimedb, i) except EnvironmentError: break try: ctype = ctype.encode(default_encoding) # omit in 3.x! except UnicodeEncodeError: pass else: yield ctype i += 1
The registry key(s) being read are
HKEY_CLASSES_ROOT\MIME\Content Type but the .reg file I have from the user contains now issues nor any dodgy looking characters.
I wondered, could regedit have cleaned up any problems when creating the exported file?
The registry data from content types; http://pastebin.com/fqygjBfj