On May 21, 2011, at 12:57 AM, Jérôme wrote:

It is maybe related to the name variable ?

      name = name_displayer.display(self.__person)
       title = _("Number of Ancestors for %s") % name

Note, I still think that to force locale 'C' is not a good solution.
There is no "british" translation, you can force to use LANG=en_US.UTF-8, isn't it?

Agreed, MacOS fully support unicode & co, but there is also some specific issues (BOM, little endian vs big endian), no ?

Why this happen on 3.3 and 3.2.6 or with or without CLI ?
There is some changes, but they are more general (like GUI option strings on reports) or rewrite of draw reports.
Are you testing the same person under 3.3 and 3.2.6 ?
Did you try to make a new report_option.xml into your profil?

Maybe to try to debug with something more "python" ?
like logging ?
http://www.gramps-project.org/wiki/index.php?title=Logging_system
http://www.gramps-project.org/wiki/index.php?title=Debugging_GRAMPS

I got rpdb2 worked out, python stack trace and listing of the top frame shown below. Again, this only happens on Gramps-3.3 when run inside an app bundle (regardless of whether it's started from the command-line or with launch services). When run from its installation directory via the command line, it works fine, and Gramps-3.2.6 works fine either way.

Note that both 3.2.6 and 3.3 are being initialized with identical rungramps.py, where (since en_US is my first-choice language) $LANG is "C" and $LC_COLLATE, $LC_TIME, and $LANGUAGE are all set to "en_US", and (to ensure the encoding is UTF-8) $LC_ALL is "en_US.UTF-8". To make sure, though, I tried with all of the language stuff commented out. No change.

Unless the unicode implementation in Python2.7 is very seriously broken (rather unlikley) there should be no issues with BOM or endianness.

Moving aside report_options.xml made no difference.

Regards,
John Ralls


> stack
Stack trace for thread -1333796864:

   Frame  File Name                     Line  Function                 
------------------------------------------------------------------------------
 *     0  .../lib/python2.7/gettext.py   131  _expand_lang
       1  .../lib/python2.7/gettext.py   437  find
       2  .../lib/python2.7/gettext.py   465  translation
       3  .../lib/python2.7/gettext.py   530  dgettext
       4  .../lib/python2.7/gettext.py   566  gettext
       5  ...re/gramps/gen/ggettext.py    48  gettext
       6  ...umberOfAncestorsReport.py    92  write_report
       7  ...g/report/_reportdialog.py   692  do_report
       8  ...ib/python2.7/threading.py   483  run
       9  ...ib/python2.7/threading.py   530  __bootstrap_inner
      10  ...ib/python2.7/threading.py   503  __bootstrap

> thread
List of active threads known to the debugger:

    No    Tid  Name             State                 
-----------------------------------------------
     0  -1605888704  MainThread       waiting at break point
 >   1  -1333796864  Thread-1         running

> list
Source lines for thread -1333796864 from file '/Users/john/Desktop/Gramps-33.app/Contents/Resources/lib/python2.7/gettext.py':

        121              stack[-1] += '(%s)' % s
        122          else:
        123              stack[-1] += c
        124      plural = expr.sub(repl, stack.pop())
        125  
        126      return eval('lambda n: int(%s)' % plural)
        127  
        128  
        129  
        130  def _expand_lang(locale):
 *>     131      from locale import normalize
        132      locale = normalize(locale)
        133      COMPONENT_CODESET   = 1 << 0
        134      COMPONENT_TERRITORY = 1 << 1
        135      COMPONENT_MODIFIER  = 1 << 2
        136      # split up the locale into its base components
        137      mask = 0
        138      pos = locale.find('@')
        139      if pos >= 0:
        140          modifier = locale[pos:]