Discussion:
[BitPim-devel] Can't run bitpim under windows xp with unicode path names.
Yura
2005-06-02 14:49:07 UTC
Permalink
I have problems running bitpim under russian language version of win
xp. bitpim.exe just silently dies after showing splash screen,
bitfling seems to start, but shows the following in log tab. As you
can see, the problem is in improper handling of non-ascii paths.
In russian version of xp some folders, like "my documents",
"favorites", etc, have cyrillic names.

16:45:19.239: Traceback (most recent call last):
File "wx\_core.pyo", line 11917, in <lambda>
File "bitfling\bitfling.pyo", line 642, in StartIfICan
File "bitfling\bitfling.pyo", line 635, in GetCertificateFilename
UnicodeEncodeError: 'ascii' codec can't encode characters in position 26-38: ordinal not in range(128)

Variables by last 8 frames, innermost last

Frame ? in bp.py at line 73
_donowt = <class __main__._donowt at 0x00961F60>
ignorer = <function ignorer at 0x009667B0>
__name__ = '__main__'
__doc__ = 'Main entry point to Bitpim\n\nIt invokes BitPim in gui or commandline mode as appropriate\n\***@Note: Only gui mode is supported at the moment\n'

Frame run in bitfling\bitfling.pyo at line 785
menu = <wx._core.Menu; proxy of C++ wxMenu instance at _203bb700_p_wxMenu>
mw = <bitfling.bitfling.MainWindow; proxy of C++ wxFrame instance at _683db700_p_wxFrame>
args = ['C:\\Program Files\\BitPim\\bitpim.exe', 'bitfling']
theApp = <wx._core.PySimpleApp; proxy of C++ wxPyApp instance at _10af9400_p_wxPyApp>
taskwin = <bitfling.bitfling.MyTaskBarIcon; proxy of C++ wxPyTaskBarIcon instance at _20e89e01_p_wxPyTaskBarIcon>

Frame MainLoop in wx\_core.pyo at line 6171
self = <wx._core.PySimpleApp; proxy of C++ wxPyApp instance at _10af9400_p_wxPyApp>

Frame MainLoop in wx\_core.pyo at line 5604
args = (<wx._core.PySimpleApp; proxy of C++ wxPyApp instance at _10af9400_p_wxPyApp>,)
kwargs = {}

Frame <lambda> in wx\_core.pyo at line 11917
event = <wx._core.PyEvent; proxy of C++ wxPyEvent instance at _e027ba00_p_wxPyEvent>

Frame StartIfICan in bitfling\bitfling.pyo at line 642
self = <bitfling.bitfling.MainWindow; proxy of C++ wxFrame instance at _683db700_p_wxFrame>

Frame GetCertificateFilename in bitfling\bitfling.pyo at line 635
path = u'C:\\Documents and Settings\\\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\\\u041c\u043e\u0438 \u0434\u043e\u043a\u0443\u043c\
self = <bitfling.bitfling.MainWindow; proxy of C++ wxFrame instance at _683db700_p_wxFrame>
--
Best regards,
Yura mailto:***@ukr.net
Roger Binns
2005-06-02 17:45:09 UTC
Permalink
Post by Yura
I have problems running bitpim under russian language version of win
xp. bitpim.exe just silently dies after showing splash screen,
bitfling seems to start, but shows the following in log tab. As you
can see, the problem is in improper handling of non-ascii paths.
In russian version of xp some folders, like "my documents",
"favorites", etc, have cyrillic names.
Can you run BitPim from source and mail all the tracebacks here?

Things should mostly be working as all the BitPim code should
be using Unicode, the other libraries we use are Unicode and
even Python itself will be on Windows if pushed a little.

Roger
Yura
2005-06-03 13:01:38 UTC
Permalink
I've just looked through the bitpim-devel archive and I've found that
this problem was discussed recently (topic "about ascii code greater
than 0x7F in file name"). Here is just the same problem! I think there
is unicode-to-ansi conversion somewhere and it needs to use some kind
of codepage, other than 7-bit ascii (for cyrillic symbols in win32 it is
"cp1251").

BTW, you can try to open in bitpim any file or directory with non-ascii
characters and see the exception.
I made a test zip archive with cyrillic files and folders, you can
download it from here: http://www.cdmasolutions.com/trash/
You may need to install Russian language support in windows to see the
names correctly.

At least, you can add an option to store all user data in bitpim
intallation directory, and avoid usage of "Documents and Setting"
subfolders. This should make the program work on non-english Windows.
--
Best regards,
Yura mailto:***@ukr.net
Yura
2005-06-03 13:13:37 UTC
Permalink
My previous message was lost, so I am resending it:

Hello Roger,
Post by Yura
I have problems running bitpim under russian language version of win
xp. bitpim.exe just silently dies after showing splash screen,
bitfling seems to start, but shows the following in log tab. As you
can see, the problem is in improper handling of non-ascii paths.
In russian version of xp some folders, like "my documents",
"favorites", etc, have cyrillic names.
RB> Can you run BitPim from source and mail all the tracebacks here?
RB> Things should mostly be working as all the BitPim code should
RB> be using Unicode, the other libraries we use are Unicode and
RB> even Python itself will be on Windows if pushed a little.

I am not familiar with Python, so it would take time to install all
the stuff and understand a new programming language.
But I tried another old version - 0.7-test6.
It also fails to start, but shows a window with more information (see
below). I tried to run it on 3 PCs with Russian language OS, and
the problem is the same.

I think the problem is here:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 26-38: ordinal not in range(128)

And, probably, here is the unicode path that can't be handled
properly:

Frame setdefaults in guiwidgets.pyo at line 448
path = u'C:\\Documents and Settings\\\u0410\u0434\u043c\u0438\u043d
self = <guiwidgets.ConfigDialog instance; proxy of C++ wxDialog ins

Here is the complete log:
----------------------------------------------------------------------

An unexpected exception has occurred.
Please see the help for details on what to do.

Traceback (most recent call last):
File "gui.pyo", line 239, in OnClose
File "gui.pyo", line 236, in goforit
File "gui.pyo", line 317, in makemainwindow
File "gui.pyo", line 485, in __init__
File "guiwidgets.pyo", line 359, in __init__
File "guiwidgets.pyo", line 448, in setdefaults
UnicodeEncodeError: 'ascii' codec can't encode characters in position 26-38: ordinal not in range(128)

Variables by last 8 frames, innermost last

Frame MainLoop in wxPython\wx.pyo at line 1974
self = <gui.MainApp instance; proxy of C++ wxPyApp instance at _931

Frame MainLoop in wxPython\wx.pyo at line 92
_kwargs = {}
self = <gui.MainApp instance; proxy of C++ wxPyApp instance at _931
_args = ()

Frame OnClose in gui.pyo at line 239
self = <gui.MySplashScreen instance; proxy of C++ wxSplashScreen in
evt = <wxPython.events.wxCloseEventPtr instance; proxy of C++ wxCl

Frame goforit in gui.pyo at line 236
self = <gui.MySplashScreen instance; proxy of C++ wxSplashScreen in

Frame makemainwindow in gui.pyo at line 317
self = <gui.MainApp instance; proxy of C++ wxPyApp instance at _931

Frame __init__ in gui.pyo at line 485
sz = wxSize(16, 15)
parent = None
title = 'BitPim'
menu = <wxPython.windows.wxMenu instance; proxy of C++ wxMenu insta
self = <gui.MainWindow instance; proxy of C++ wxFrame instance at _
sb = <guiwidgets.MyStatusBar instance; proxy of C++ wxStatusBar i
config = <wxPython.utils.wxConfig instance; proxy of C++ wxConfig ins
id = -1
menuBar = <wxPython.windows.wxMenuBar instance; proxy of C++ wxMenuBar

Frame __init__ in guiwidgets.pyo at line 359
gs = <wxPython.sizers.wxFlexGridSizer instance; proxy of C++ wxFl
title = 'BitPim Settings'
keys = ['Audiovox CDM-8900', 'LG-VX4400', 'LG-VX4500', 'LG-VX6000',
frame = <gui.MainWindow instance; proxy of C++ wxFrame instance at _
but = <wxPython.sizers.wxBoxSizerPtr instance; proxy of C++ wxBoxS
mainwindow = <gui.MainWindow instance; proxy of C++ wxFrame instance at _
self = <guiwidgets.ConfigDialog instance; proxy of C++ wxDialog ins
bs = <wxPython.sizers.wxBoxSizer instance; proxy of C++ wxBoxSize
id = -1

Frame setdefaults in guiwidgets.pyo at line 448
path = u'C:\\Documents and Settings\\\u0410\u0434\u043c\u0438\u043d
self = <guiwidgets.ConfigDialog instance; proxy of C++ wxDialog ins
--
Best regards,
Yura mailto:***@ukr.net
Loading...