Getting "Cannot set locale to language Arabic"

I'm testing the attached application, py2exe'd and sent to a client. He gets a popup window with the title "Arabic nights Error" and content "Cannot set locale to language Arabic".

I get the following logs *before* the popup happens:
DEBUG:2007-10-09 11:09:19,516:OnInit at main.py(30): Forcing setting of arabic...
DEBUG:2007-10-09 11:09:19,516:OnInit at main.py(33): Creating main window...
DEBUG:2007-10-09 11:09:19,516:OnInit at main.py(35): Main frame created, setting top window
DEBUG:2007-10-09 11:09:19,532:OnInit at main.py(37): Showing frame...
DEBUG:2007-10-09 11:09:19,532:OnInit at main.py(39): Done, returning True in OnInit

Which basically means... wxWidgets is showing that popup somewhere, sometime in the main application event loop and I'm unable to control it, hide it, or customise the message.

I'm running 2.8.0 under WindowsXP and obviously the solution is to install locale support for Arabic in the OS, but is there any way to control this popup, reduce it to a log or something like that? I don't like it appearing out of nowhere in my program when I'm switching locales or some user is just looking at the different available languages and some of them popup the ugly message.

main.py (1.03 KB)

···

--
Rastertech España S.A.
  Grzegorz Adam Hankiewicz
/Jefe de Producto TeraVial/

C/ Perfumería 21. Nave I. Polígono industrial La Mina
28770 Colmenar Viejo. Madrid (España)
Tel. +34 918 467 390 (Ext.17) *·* Fax +34 918 457 889
ghankiewicz@rastertech.es *·* www.rastertech.es <http://www.rastertech.es/>

Grzegorz Adam Hankiewicz escribió:

I'm running 2.8.0 under WindowsXP and obviously the solution is to install locale support for Arabic in the OS, but is there any way to control this popup, reduce it to a log or something like that?

Ok, so it is the C++ version calling wxLogWarning. I have been able to supress the popup with wx.LogGui.EnableLogging(False).

However, I would prefer if I could log these messages somewhere (right now I'm using python's logging module). I've found a message about SetActiveTarget (http://lists.wxwidgets.org/archive/wxPython-users/msg13878.html) but it doesn't look promising.

Any examples?

···

--
     Rastertech España S.A.
  Grzegorz Adam Hankiewicz
/Jefe de Producto TeraVial/

C/ Perfumería 21. Nave I. Polígono industrial La Mina
28770 Colmenar Viejo. Madrid (España)
Tel. +34 918 467 390 (Ext.17) *·* Fax +34 918 457 889
ghankiewicz@rastertech.es *·* www.rastertech.es
<http://www.rastertech.es/&gt;

Grzegorz Adam Hankiewicz wrote:

Grzegorz Adam Hankiewicz escribió:

I'm running 2.8.0 under WindowsXP and obviously the solution is to install locale support for Arabic in the OS, but is there any way to control this popup, reduce it to a log or something like that?

Ok, so it is the C++ version calling wxLogWarning. I have been able to supress the popup with wx.LogGui.EnableLogging(False).

However, I would prefer if I could log these messages somewhere (right now I'm using python's logging module). I've found a message about SetActiveTarget (http://lists.wxwidgets.org/archive/wxPython-users/msg13878.html) but it doesn't look promising.

Any examples?

Look in the demo's Main.py. It shows both how to create your own log target class and how to use SetActiveTarget to direct the log messages there. It should be pretty simple to create a log target that sends the messages to Python's current logging target.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!