code-google-com / bpbible

Automatically exported from code.google.com/p/bpbible
Other
0 stars 0 forks source link

Localization of non roman numbers causes program error. #148

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Select File/Language/Bible Book Names/Hindi or Nepali
2.Select from the drop down - Jude or Philemon
3.Or Select 1Peter and start selecting off of the header bar one chapter to 
the right, one at a time. Depending on your display size, after about 10 
clicks on the chapter bar a program error will happen.

What is the expected output? What do you see instead?
Program error.

What version of the product are you using? On what operating system?
Running Current SVN Rev 1005 source code on Windows 7

If the problem happens with one particular module (Bible, commentary,
dictionary, or book), what module is it?
Happens on any Bible module.  I used the KJV

Please provide any additional information below.

If I remove the following line from the localization file(ne-utf8.conf or 
hi-utf8.conf),"0123456789=०१२३४५६७८९" I can not reproduce 
the problem. But, 
then all numbers show up as roman instead of devanagari.

This will only occur in books towards the end of the Bible.  Selecting Jude 
or Philemon from the drop down verse selector will also product this 
problem.

Below is the stack from the error message details.

Traceback (most recent call last):
  File "C:\Users\Tim\workspace\BpBible\bpbible\header_bar.py", line 95, in 
<lambda>
    self.Parent.on_click(self.internal_text)
  File "C:\Users\Tim\workspace\BpBible\bpbible\util\observerlist.py", line 
17, in __call__
    if not self._call_function(function, initial_args + args, kwargs):
  File "C:\Users\Tim\workspace\BpBible\bpbible\util\observerlist.py", line 
21, in _call_function
    function(*args, **kwargs)
  File "C:\Users\Tim\workspace\BpBible\bpbible\bibleframe.py", line 45, in 
<lambda>
    guiconfig.mainfrm.set_bible_ref(chapter, HEADER_BAR)
  File "C:\Users\Tim\workspace\BpBible\bpbible\mainframe.py", line 1314, in 
set_bible_ref
    self.UpdateBibleUI(source, settings_changed, y_pos)
  File "C:\Users\Tim\workspace\BpBible\bpbible\mainframe.py", line 1282, in 
UpdateBibleUI
    y_pos=y_pos,
  File "C:\Users\Tim\workspace\BpBible\bpbible\util\observerlist.py", line 
17, in __call__
    if not self._call_function(function, initial_args + args, kwargs):
  File "C:\Users\Tim\workspace\BpBible\bpbible\util\observerlist.py", line 
21, in _call_function
    function(*args, **kwargs)
  File "C:\Users\Tim\workspace\BpBible\bpbible\mainframe.py", line 118, in 
<lambda>
    lambda event: self.bibletext.SetReference(event.ref, 
y_pos=event.y_pos),
  File "C:\Users\Tim\workspace\BpBible\bpbible\gui\guiutil.py", line 36, in 
frozen_internal
    function(self, *args, **kwargs)
  File "C:\Users\Tim\workspace\BpBible\bpbible\bibleframe.py", line 299, in 
SetReference
    pysw.internal_to_user(chapter), chapter
  File "C:\Users\Tim\workspace\BpBible\bpbible\header_bar.py", line 283, in 
set_current_chapter
    self.on_size()
  File "C:\Users\Tim\workspace\BpBible\bpbible\header_bar.py", line 344, in 
on_size
    next_item = ChapterItem(self, internal_text)
  File "C:\Users\Tim\workspace\BpBible\bpbible\header_bar.py", line 77, in 
__init__
    self.chapter = pysw.internal_to_user(internal)
  File "C:\Users\Tim\workspace\BpBible\bpbible\swlib\pysw.py", line 1692, 
in internal_to_user
    return UserVK(VK(key)).getText()
  File "C:\Users\Tim\workspace\BpBible\bpbible\swlib\pysw.py", line 582, in 
getText
    userOutput=True
  File "C:\Users\Tim\workspace\BpBible\bpbible\swlib\pysw.py", line 1678, 
in process_digits
    return locale_digits["internal_to_external"](text)
  File "C:\Users\Tim\workspace\BpBible\bpbible\swlib\pysw.py", line 1472, 
in replace
    return matcher.sub(replace_digit, s)
TypeError: expected string or buffer

Original issue reported on code.google.com by timjch...@gmail.com on 4 May 2010 at 5:07

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1006.

Original comment by benpmor...@gmail.com on 5 May 2010 at 12:55

GoogleCodeExporter commented 9 years ago
I don't think I'd ever tried this particular path through the code so it wasn't
correct... Thanks for the report.

Original comment by benpmor...@gmail.com on 5 May 2010 at 12:56

GoogleCodeExporter commented 9 years ago

Original comment by jonmmor...@gmail.com on 5 May 2010 at 12:56