Enthought Canopy 1.3.0 Welcome Issue

The Issue

After a fresh install of Enthought Canopy win x86 version, it starts with a welcome error.

The error page

The Solution

A possible solution is mentioned on the enthought blog in a reply of this post.

The reply about the solution

The solution is to change the code in file

C:\Program Files\Enthought\Canopy32\App\appdata\canopy-\Lib\mimetypes.py


254    i += 1
256    default_encoding = sys.getdefaultencoding()


254    i += 1
256    if sys.getdefaultencoding()!='gbk':
257        reload(sys)
258        sys.setdefaultencoding('gbk')
260    default_encoding = sys.getdefaultencoding()

It Works

The fixed welcoming page

I am still inexperienced to know why this solution works.

However, from the code, it can be found that the windows xp doesn’t provide a proper return string ‘gbk’. In the solution, the system default encoding is set manually to ‘gbk’.

The problem could be the system - windows xp, but also could be the python function, which provides the system settings.