Opened 13 years ago

Closed 13 years ago

#1982 closed defect (duplicate)

[with patch that needs to be integrated into spkg] workaround the billions of problems with matplotlib and locales on _real world_ computers

Reported by: was Owned by: was
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: graphics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Forwarded conversation
Subject: [sage-support] problems with

From: Reineke <>
Date: Jan 29, 2008 3:57 AM
To: sage-support <>


I get the following error when I'm trying to use show or save:

 File "/Applications/sage/local/lib/python2.5/site-packages/sympy/
plotting/", line 1, in <module>

 File "/Applications/sage/local/lib/python2.5/site-packages/sympy/
plotting/", line 721, in show

 File "/Applications/sage/local/lib/python2.5/site-packages/sympy/
plotting/", line 792, in save

 File "/Users/was/build/sage-2.10/local/lib/python2.5/site-packages/
matplotlib/", line 8, in <module>
 File "/Users/was/build/sage-2.10/local/lib/python2.5/site-packages/
matplotlib/", line 3, in <module>
 File "/Users/was/build/sage-2.10/local/lib/python2.5/site-packages/
matplotlib/", line 18, in <module>
 File "/Applications/sage/local/lib/python/", line 507, in
   return getdefaultlocale()[1]
 File "/Applications/sage/local/lib/python/", line 443, in
   return _parse_localename(localename)
 File "/Applications/sage/local/lib/python/", line 375, in
   raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

I'm a total newbie and installed sage 2.10 from a .dmg on Mac Os 10.5.
It seems to be a python error, but I have no idea about python as

Thanks for your help

To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

From: William Stein <>
Date: Jan 29, 2008 4:48 AM

Could you try carefully replacing  the file


on your computer by the attached file, then report back to us whether this
fixes the problem or not?  Thanks!  If so, we'll be able to easily patch Sage
so that this problem doesn't happen for you in the future (when you upgrade).

Thanks for reporting this issue with running Sage!

 - William
From: Reineke <>
Date: Jan 30, 2008 4:18 AM
To: sage-support <>

Hi William,

thanks for your help. The file worked perfectly fine!
Kudos to the program, I'm just starting to use it and already it seems
REALLY powerful!


On Jan 29, 10:48 am, "William Stein" <> wrote:
> 37KDownload

William Stein
Associate Professor of Mathematics
University of Washington 

Attachments (1) (27.9 KB) - added by was 13 years ago.
This has to be made part of the matplotlib spkg

Download all attachments as: .zip

Change History (3)

Changed 13 years ago by was

This has to be made part of the matplotlib spkg

comment:1 Changed 13 years ago by was

I think there is also a need version of matplotlib, so probably when looking into this patch, one should also upgrade matplotlib, and see if this change is still needed.

The changed try except calling some locale function in the standard Python library, because on REAL LIFE computers often that function often blows up (!), even though it probably "shouldn't" if everybody's computers were setup perfectly. Honestely, I've even had related problems on my office mac pro, which is pretty weird since it's fairly plain vanilla.

comment:2 Changed 13 years ago by mabshoff

  • Milestone changed from sage-2.10.1 to sage-duplicate/invalid
  • Resolution set to duplicate
  • Status changed from new to closed

This is a dupe of #1967. is identical in both cases.

Note: See TracTickets for help on using tickets.