diff --git a/wxPython/src/_core_ex.py b/wxPython/src/_core_ex.py index 45f7eeab6d..0e5a51307b 100644 --- a/wxPython/src/_core_ex.py +++ b/wxPython/src/_core_ex.py @@ -47,7 +47,7 @@ if default == 'ascii': try: default = locale.getdefaultlocale()[1] codecs.lookup(default) - except (ValueError, LookupError): + except (ValueError, LookupError, TypeError): default = _sys.getdefaultencoding() del locale del codecs