broken in ubuntu 8.10?

0 views
Skip to first unread message

Matías Iturburu

unread,
Jan 21, 2009, 2:38:29 AM1/21/09
to fontypython
Hi all:
I've got a fresh checkout of fp, running ./fp to get the gui raises
"Unhandled PIL error.exceptions.UnicodeEncodeError"

PIL is properly installed, as are the others dependencies.

Is this a know issue? if not, how can i get more debug information? if
it is, how can I fix it?


Regards

Donn

unread,
Jan 21, 2009, 3:40:58 AM1/21/09
to fonty...@googlegroups.com
On Wednesday, 21 January 2009 09:38:29 Matías Iturburu wrote:
> I've got a fresh checkout of fp,
Did you install it via synaptic (or ubuntu's package manager)? If not, I would
suggest removing it and using Synaptic.

> running ./fp to get the gui raises

Did it open and immediately close? Or did you browse to a folder and view any
fonts?
Have you ever managed to use it? There may be a bad font it's trying to open
that is killing it now. Go look in ~/.fontypython and inspect the
file 'segfonts'

> "Unhandled PIL error.exceptions.UnicodeEncodeError"
Is that all it says? Perhaps there was more output.

> Is this a know issue? if not, how can i get more debug information? if
> it is, how can I fix it?

I thought I had stamped on all the unicode errors a year ago...

Your best bet is to remove the conf file (~/.fontypython/fp.conf) and start it
again. Then point it at a folder with a few font files in it. Any fonts in
that folder with unusual characters in the file name may be causing the
problem -- so you'd have to remove them one by one until fonty runs ok.

You can also keep an eye on 'segfonts' which tries to hold the name of the
font that caused trouble most recently.

I hope you manage to narrow-down the problem. I have not touched the code for
over a year, so I don't even remember much of it :)

Let me know what you find, I will see if I can help.

If you want to learn Python, then get the source and hack away.

\d

Matías Iturburu

unread,
Jan 21, 2009, 3:42:16 AM1/21/09
to fonty...@googlegroups.com
On Wed, Jan 21, 2009 at 6:40 AM, Donn <donn....@gmail.com> wrote:

On Wednesday, 21 January 2009 09:38:29 Matías Iturburu wrote:
>    I've got a fresh checkout  of fp,
Did you install it via synaptic (or ubuntu's package manager)? If not, I would
suggest removing it and using Synaptic.

The package in ubuntu was the first I tried, but it only renders a list with "font may be bad and it cannot be drawn", the font's path and name.

The font files are ok, though.
 


>    running ./fp to get the gui raises
Did it open and immediately close? Or did you browse to a folder and view any
fonts?
Have you ever managed to use it? There may be a bad font it's trying to open
that is killing it now. Go look in ~/.fontypython and inspect the
file 'segfonts'

Couldn't find a segfonts file, I have a 'badfiles' but it shows all the files in the folder, so it's the same issue than above methinks
 


> "Unhandled PIL error.exceptions.UnicodeEncodeError"
Is that all it says? Perhaps there was more output.

yep, all it says, I've tried running fp from the console but it doesn't says anything
 


> Is this a know issue? if not, how can i get more debug information? if
> it is, how can I fix it?
I thought I had stamped on all the unicode errors a year ago...

Your best bet is to remove the conf file (~/.fontypython/fp.conf) and start it
again. Then point it at a folder with a few font files in it. Any fonts in
that folder with unusual characters in the file name may be causing the
problem -- so you'd have to remove them one by one until fonty runs ok.

Check yourself (http://dpaste.com/hold/111337/) I believe there are no bad names on it
 


You can also keep an eye on 'segfonts' which tries to hold the name of the
font that caused trouble most recently.

I hope you manage to narrow-down the problem. I have not touched the code for
over a year, so I don't even remember much of it :)

Let me know what you find, I will see if I can help.

If you want to learn Python, then get the source and hack away.

I know python a little, but never done a desktop app with it.

Thanks for the fast response
 


\d





--
Matías Iturburu
Revoluciones Informáticas
www.revolucionesweb.com.ar
http://www.linkedin.com/in/miturburu

Donn

unread,
Jan 21, 2009, 4:17:24 AM1/21/09
to fonty...@googlegroups.com
On Wednesday, 21 January 2009 10:42:16 Matías Iturburu wrote:
> The package in ubuntu was the first I tried, but it only renders a list
> with "font may be bad and it cannot be drawn", the font's path and name.
This happens because fonty relies on PIL (a library) and it has trouble with
certain fonts. It looks like you may just be in the unhappy position of using
those fonts.

Still, from your description, fonty is still running -- at what point does is
close with the unicode error?

> Couldn't find a segfonts file,

Okay, that's some good news at least.

> I have a 'badfiles' but it shows all the
> files in the folder, so it's the same issue than above methinks

Try this:
1. Make a folder ~/testfonts/
2. Put a few of those A008*.ttf fonts into it.
3. Open a console and fp ~/testfonts/

In that test we have removed the name 'Tipografías' from the picture -- just
to see if that was the problem.

> > > "Unhandled PIL error.exceptions.UnicodeEncodeError"
> > Is that all it says? Perhaps there was more output.
> yep, all it says, I've tried running fp from the console but it doesn't
> says anything

Very strange - usually Python dumps quite a lot of info on a bug. That's not
enough to get to the problem.

> Check yourself (http://dpaste.com/hold/111337/) I believe there are no bad
> names on it

Thanks, that gave rise to the test above.

> I know python a little, but never done a desktop app with it.

Well, if you have the time and want the challenge, then see if you can follow
the code to the point where the error is happening. I would appreciate at
least some idea of where things are going wrong.

Good luck,
\d

Matías Iturburu

unread,
Jan 21, 2009, 8:05:04 AM1/21/09
to fonty...@googlegroups.com
On Wed, Jan 21, 2009 at 7:17 AM, Donn <donn....@gmail.com> wrote:

On Wednesday, 21 January 2009 10:42:16 Matías Iturburu wrote:
> The package in ubuntu was the first I tried, but it only renders a list
> with "font may be bad and it cannot be drawn", the font's path and name.
This happens because fonty relies on PIL (a library) and it has trouble with
certain fonts. It looks like you may just be in the unhappy position of using
those fonts.

Still, from your description, fonty is still running -- at what point does is
close with the unicode error?

Oh, no... The PIL exceptions raises with fp running from the source. If I have a working ~/.fontypython dir it just raises the exception and closes, if I remove the directory (which I did after your first reply), it closes as soon as the GUI comes up.
 


> Couldn't find a segfonts file,
Okay, that's some good news at least.

> I have a 'badfiles' but it shows all the
> files in the folder, so it's the same issue than above methinks
Try this:
1. Make a folder ~/testfonts/
2. Put a few of those A008*.ttf fonts into it.
3. Open a console and fp ~/testfonts/

In that test we have removed the name 'Tipografías' from the picture -- just
to see if that was the problem.

mmm that did it... seems like it can't handle directories with unicode characters.
 


> > > "Unhandled PIL error.exceptions.UnicodeEncodeError"
> > Is that all it says? Perhaps there was more output.
> yep, all it says, I've tried running fp from the console but it doesn't
> says anything
Very strange - usually Python dumps quite a lot of info on a bug. That's not
enough to get to the problem.

> Check yourself (http://dpaste.com/hold/111337/) I believe there are no bad
> names on it
Thanks, that gave rise to the test above.

Actually I haven't spotted the ' on tipografías, or didn't thought it could make such a trouble.
 


> I know python a little, but never done a desktop app with it.
Well, if you have the time and want the challenge, then see if you can follow
the code to the point where the error is happening. I would appreciate at
least some idea of where things are going wrong.


I work mostly with web stuff (zope, django...). I'll make me some time and give it a try.
 


Good luck,

Thanks a lot
 

\d


Donn

unread,
Jan 21, 2009, 8:30:38 AM1/21/09
to fonty...@googlegroups.com
On Wednesday, 21 January 2009 15:05:04 Matías Iturburu wrote:
> mmm that did it... seems like it can't handle directories with unicode
> characters.
That's not a good sign at all -- but unicode is new to me and I am sure there
will be other mysterious problems in the future.

At least it's working now! Phew :D

> I work mostly with web stuff (zope, django...). I'll make me some time and
> give it a try.

I am learning Django now and spend most of my time there. I just never get any
chance to go back and fix my other projects :(

Anyway, I am glad you can get past that error. Enjoy fonty!

Regards,
\d

Reply all
Reply to author
Forward
0 new messages