[IPython-dev] Better reporting for non-ascii home dir names

Ville M. Vainio vivainio at gmail.com
Mon Apr 30 08:06:36 EDT 2007


On 4/30/07, Stefan van der Walt <stefan at sun.ac.za> wrote:

> On Mon, Apr 30, 2007 at 01:14:02PM +0200, Ville M. Vainio wrote:
> > I just added the change
> >
> > http://projects.scipy.org/ipython/ipython/changeset/2297
> >
> > because it's the second most common cause of ipython crashes, just
> > after KeyboardInterrupt.
>
> Why does that crash IPython?  I can't get it to malfunction on my
> system, e.g.

It crashes for users that have non-ascii chars in their username.

Here's a snippit that "works" for me:

[D:\ipython]|25> p = pickleshare.Pic
pickleshare.PickleShareDB   pickleshare.PickleShareLink
[D:\ipython]|25> p = pickleshare.PickleShareDB('/tmp/äqäqäq')
---------------------------------------------------------------------------
<type 'exceptions.UnicodeDecodeError'>    Traceback (most recent call last)

D:\ipython\<ipython console> in <module>()

D:\ipython\IPython\Extensions\pickleshare.py in __init__(self, root)
     45     def __init__(self,root):
     46         """ Return a db object that will manage the specied directory"""

---> 47         self.root = Path(root).expanduser().abspath()
     48         if not self.root.isdir():
     49             self.root.makedirs()

<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xc3 in
position 5: ordinal not in range(128)
[D:\ipython]|26>





-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'



More information about the IPython-dev mailing list