braille_alphabets level5 doesn't work: one digit ints messed with chars

Bug #1000333 reported by Aapo Rantalainen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcompris (Ubuntu)
New
Undecided
Unassigned

Bug Description

Gcompris: 12.01-0ubuntu1
Activity: braille_alphabet ("Discover the braille system")
Go to level 5. Level can't be played.

 Traceback (most recent call last):
  File "/usr/share/gcompris/python/braille_alphabets.py", line 132, in set_level
    self.display_level(self.gcomprisBoard.level)
  File "/usr/share/gcompris/python/braille_alphabets.py", line 256, in display_level
    self.braille_cell(level)
  File "/usr/share/gcompris/python/braille_alphabets.py", line 293, in braille_cell
    self.play_letter(self.random_letter)
  File "/usr/share/gcompris/python/braille_alphabets.py", line 289, in play_letter
    filename = 'voices/$LOCALE/alphabet/U%04X.ogg' % ord(letter.lower())
AttributeError: 'int' object has no attribute 'lower'

----
This makes it playable, but not winnable (it doesn't recognise correct answer)
src/braille_alphabets-activity/braille_alphabets.py
     elif(level == 5):
         self.show_play_button()
- chars = ['0','1','2','3','4','5','6','7','8','9']
+ chars = [0,1,2,3,4,5,6,7,8,9]
         self.gcomprisBoard.number_of_sublevel = len(chars)

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.