pykaraoke won't read fonts

Bug #1828592 reported by J.G.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pykaraoke (Ubuntu)
Opinion
Undecided
J.G.

Bug Description

Dear,
i was making a executable icon for pykaraoke_mini.py downloaded from github.com.
I noticed that in order to make executable work i was needed to put both full path to python executable in Exec variable and Path variable. In oder case the executable doesnt work.

Example:
[Desktop Entry]
Name=pyKaraoke mini
Version=0.75
Exec=~/pykaraoke-master/pykaraoke_mini.py
Terminal=false
Type=Application
Path=~/pykaraoke-master/

I was questioning it, because the pykaraoke deb packet seems to be not working.
The reason that pykaraoke doesn't want to play karaoke (.kar and .mid files) is when i run it from terminal it gives me error message:

<type 'exceptions.IOError'>
unable to read font filename

so i guessed that python also can't find the path to the fonts used in playing karaoke files in pykaraoke binary.

I maked a test by editing pykaraoke_mini.py lines:
font = pygame.font.Font(os.path.join(manager.FontPath, "DejaVuSansCondensed-Bold.ttf"), 12)

self.thinFont = pygame.font.Font(os.path.join(manager.FontPath, "DejaVuSansCondensed.ttf"),

self.boldFont = pygame.font.Font(os.path.join(manager.FontPath, "DejaVuSansCondensed-Bold.ttf"), fontSize)

self.titleFont = pygame.font.Font(os.path.join(manager.FontPath, "DejaVuSansCondensed-Bold.ttf"), fontSize)

and

self.subtitleFont = pygame.font.Font(os.path.join(manager.FontPath, "DejaVuSansCondensed.ttf"), fontSize)

by putting a full path to the selected fonts, by example:
manager.FontPath, "/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-Bold.ttf"

and pykaraoke_mini.py executed with no errors, but it didn't want to play again because i think there are needed to be full paths entered in other portions of the code, in order to make pykaraoke function properly.

So i maked a conclusion that this is a linux bug.

Am i right or wrong?

Thank you,
greetings,
Igor

Tags: linux python
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1828592

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
J.G. (j.gorski) wrote : Re: Duplicate entry Exec and Path in scripts.

Removed symbolic links:
/usr/share/pykaraoke/fonts/DejaVuSans.ttf
/usr/share/pykaraoke/fonts/DejaVuSansCondensed.ttf
/usr/share/pykaraoke/fonts/DejaVuSansCondensed-Bold.ttf

Copyed instead fonts in /usr/share/pykaraoke/fonts/

Works fine.

affects: linux (Ubuntu) → pykaraoke (Ubuntu)
summary: - Duplicate entry Exec and Path in scripts.
+ pykaraoke wont read fonts
Changed in pykaraoke (Ubuntu):
status: Incomplete → Fix Committed
status: Fix Committed → Opinion
assignee: nobody → J.G. (j.gorski)
J.G. (j.gorski)
summary: - pykaraoke wont read fonts
+ pykaraoke won't read fonts
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.