1

I'm migrating from Matlab to python so i decided to try the pythonxy distribution, but after installation i can't open it. When i double click on icon nothing happens. i already try to submite a issue on pythonxy page but didn't get any answer. Does anyone knows what this problem could be?

I'm using Win7 x64

this is the traceback information displayed on interactive console:

Traceback (most recent call last):
  File "C:\Python27\Scripts\xyhome.pyw", line 21, in <module>
    xyhome.main()
  File "C:\Python27\lib\site-packages\xy\xyhome.pyw", line 689, in main
    form = MainWindow(options)
  File "C:\Python27\lib\site-packages\xy\xyhome.pyw", line 134, in __init__
    self.scanstartup()
  File "C:\Python27\lib\site-packages\xy\xyhome.pyw", line 574, in scanstartup
    default_startup()
  File "C:\Python27\lib\site-packages\xy\config.py", line 85, in default_startup

    filename = osp.join(STARTUP_PATH, CONF.get(None, 'startup'))
  File "C:\Python27\lib\ntpath.py", line 109, in join
    path += "\\" + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 17: ordinal
 not in range(128)
Mariusz Jamro
  • 30,615
  • 24
  • 120
  • 162
NMPG
  • 13
  • 1
  • 5

2 Answers2

2

This is a known bug in pythonxy: http://code.google.com/p/pythonxy/issues/detail?id=146

The problem is that your home path contains non-ASCII characters; you would probably have to run it from a user without non-ASCII chars in the home path to make it work for now, while there are patches in the bug report comments, they do not seem to work as intended.

Fredrik Håård
  • 2,856
  • 1
  • 24
  • 32
  • Can you please tell how do i use the patch? – NMPG Nov 29 '11 at 11:48
  • You would have to check out the source from http://code.google.com/p/pythonxy/source/checkout using mercurial, and then import the patch using 'hg import'. However, according to the comments after the patch there are more errors that needs to be fixed. It might be easier to run it under another user if you are not comfortable with patching and repackaging the source. – Fredrik Håård Nov 29 '11 at 16:33
  • Thank you for your answer, i have modified userconfig.py by hand deleting and adding lines accordingly with patch file. – NMPG Nov 29 '11 at 17:10
0

Do you have any non-ascii characters in your path? If so, maybe you would like to change your installation path. It seems that it has a problem with the character "7".

>>> chr(231)
'\xe7'
>>> chr(55)
'7'

My guess is that your 7 in C:\Python27\ is not really a 7.

Alex Plugaru
  • 2,209
  • 19
  • 26
  • If i change python folder name then pythonxy won't recognize python at all... not sure how to change pythonxy files (ntpath.py and xyhome.py?) in order to work with new python directory... – NMPG Nov 29 '11 at 10:16