d3ru / eggbotcode

Automatically exported from code.google.com/p/eggbotcode
0 stars 0 forks source link

locale.Error: unsupported locale setting on MacOS #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
OriginallyReported by westfw, May 25 (4 days ago)
Trying to run the inkscape extension on MacOS results in a traceback:

 Traceback (most recent call last):
  File "Contents/Resources/extensions/plot2eggbot.py", line 2, in <module>
    import wx
  File
"/BinaryCache/wxWidgets/wxWidgets-
11~88/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/py
thon/wx
-2.8-mac-unicode/wx/__init__.py",
line 45, in <module>
  File
"/BinaryCache/wxWidgets/wxWidgets-
11~88/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/py
thon/wx
-2.8-mac-unicode/wx/_core.py",
line 14007, in <module>
  File
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.p
y",
line 512, in getpreferredencoding
    setlocale(LC_CTYPE, "")
  File
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.p
y",
line 476, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

A hint was found here:
  http://fatvegan.com/2007/03/14/localeerror-unsupported-locale-setting/
And I was able to make that change and write the modified locale.py (from
/usr/lib/...) to the
Inkscape.app/Contents/Resources/python/site-packages/i386/2.5/locale.py
where it was apparently picked up by the inkscape-specified path, but
Windell says there was no locale.py found on a snow-leopard mac.

Original issue reported on code.google.com by windell@oskay.net on 30 May 2010 at 11:25

GoogleCodeExporter commented 9 years ago
Some indication that this may be an issue with the particular encoding used.  
Not sure if it's that or the "null" 
problem.  

Question: Is this a general issue with wx in general on the mac?

Original comment by windell@oskay.net on 30 May 2010 at 11:26

GoogleCodeExporter commented 9 years ago
As of today current version of the inkscape driver (version eggbot_6_02_10b.zip 
or newer) includes a patched 
version of this locale.py that solves the problem. 

Note: The version of locale.py  is from Python 2.5, as used in Mac OS 10.5 and 
in 10.6, once we've downgraded 
python so that inkscape extensions work.

Original comment by windell@oskay.net on 3 Jun 2010 at 9:23