The crash happen in two case :
- the font you trying to use is missing
- you're using Debian (or ubuntu)
If you're using a debian based distribution, this problem happen when
you import pudding since the default font is not found.
The issue in fixed into the svn. But a simple workaround is to add
Freesan.tff (or any other font you wanna use) to the ./data/fonts/
directory of your project.
On 24 juin 07, at 12:53, Lunpa, The wrote:
> I'm trying to draw text on the screen as a person writes it:
>
> with soya.pudding, as soon as soya.pudding.init() is called, the
> program crashes with this trace:
>
>>>> soya.pudding.init()
> * Soya Pudding * Version: 0.1-0
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "/usr/lib/python2.4/site-packages/soya/pudding/__init__.py",
> line 69, in init
> STYLE = style or Style()
> File "/usr/lib/python2.4/site-packages/soya/pudding/style.py", line
> 26, in __init__
> self.default_font = soya.Font(soya.pudding.sysfont.SysFont('sans,
> freesans'), 15, 15 )
> File "/usr/lib/python2.4/site-packages/soya/__init__.py", line 1110,
> in __init__
> _soya._Font.__init__(self, filename, width, height)
> File "text.pyx", line 61, in _soya._Font.__init__
> File "/usr/lib/python2.4/posixpath.py", line 171, in exists
> st = os.stat(path)
> TypeError: coercing to Unicode: need string or buffer, NoneType found
>
>
> Happens in the tutorial examples.
>
>
>
> Thats fine, I'll just use widget then:
> I set up widget.label and get it to display, but with one woe:
> If there is a space in the label's text, only the text before the
> space will be displayed...
> thats no good!
>
>
> I don't care about widget so much; I'd rather use pudding, but
> neither seem to work!
> pudding crashes with the same traceback on both of my linux machines,
> one that uses soya .12 and the other using .13.
>
>
> Is there a work a good around for this? (that preferably doesn't
> involve using underscores instead of spaces with soya.widget.label ;)
> )
--
marmoute
_______________________________________________
Soya-user mailing list
[email protected]
https://mail.gna.org/listinfo/soya-user