Benny,

Can't reproduce the "UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1:"

Trying to start Gramps with
LANG=sv python3.3 Gramps.py
result in this, (I have done svn up yesterday):

Traceback (most recent call last):
  File "/home/peter/Gramps/trunk/gramps/gui/grampsgui.py", line 313, in __startgramps
    Gramps(argparser)
  File "/home/peter/Gramps/trunk/gramps/gui/grampsgui.py", line 238, in __init__
    self.vm.init_interface()
  File "/home/peter/Gramps/trunk/gramps/gui/viewmanager.py", line 960, in init_interface
    self.__build_tools_menu(self._pmgr.get_reg_tools())
  File "/home/peter/Gramps/trunk/gramps/gui/viewmanager.py", line 1754, in __build_tools_menu
    self.tool_menu_ui_id = self.uistate.uimanager.add_ui_from_string(uidef)
  File "/usr/lib64/python3.3/site-packages/gi/overrides/Gtk.py", line 297, in add_ui_from_string
    return Gtk.UIManager.add_ui_from_string(self, buffer, length)
  File "/usr/lib64/python3.3/site-packages/gi/types.py", line 47, in function
    return info.invoke(*args, **kwargs)
gi._glib.GError: Fel på rad 1 tecken 1182:Dokumentet tog oväntat slut inuti stängningstaggen för elementet "menubar"

which believed was fixed?

There is no database created yet.

I don't get this error with LANG=en.

/Peter



Peter Landgren skrev 2012-11-30 09:04:
Benny,

No family tree is open at this point.

/Peter

Benny Malengier skrev 2012-11-29 17:40:

Peter,

Is it not possible your bsddb is not set up for utf8 ?

   File "/usr/lib64/python3.3/site-packages/bsddb3/dbshelve.py", line
251, in get
     return pickle.loads(data)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1:
ordinal not in range(128)

The data in the database is utf-8, so a loads here of bsddb3 should know somehow it needs utf-8. I'll see if I can reproduce by storing a non utf-8 note type.

The second error is due to the crash in bsddb3, but we should fix it too:


2012/11/29 Peter Landgren <peter.talken@telia.com>
Hi,

Trying to start Gramps with
LANG=sv python3.3 Gramps.py
results in this, (I have done svn up):

11932: ERROR: dbloader.py: line 102: 'ascii' codec can't decode byte
0xc3 in position 1: ordinal not in range(128)
Traceback (most recent call last):
   File "/home/peter/Gramps/trunk/gramps/gui/dbloader.py", line 309, in
read_file
     mode, upgrade=False)
   File "/home/peter/Gramps/trunk/gramps/gen/db/write.py", line 282, in try_
     return func(self, *args, **kwargs)
   File "/home/peter/Gramps/trunk/gramps/gen/db/write.py", line 531, in load
     self.__load_metadata()
   File "/home/peter/Gramps/trunk/gramps/gen/db/write.py", line 675, in
__load_metadata
     self.note_types = set(meta(b'note_types'))
   File "/home/peter/Gramps/trunk/gramps/gen/db/write.py", line 651, in
<lambda>
     meta = lambda meta: self.metadata.get(meta, default=[])
   File "/usr/lib64/python3.3/site-packages/bsddb3/dbshelve.py", line
251, in get
     return pickle.loads(data)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1:
ordinal not in range(128)


Trying to start Gramps with
LANG=en python3.3 Gramps.py
and tried to do a XML import, result in this:

23029: ERROR: dbloader.py: line 261: Failed to import database.
Traceback (most recent call last):
   File "/home/peter/Gramps/trunk/gramps/gui/dbloader.py", line 251, in
do_import
     User(callback=self._pulse_progress))
   File "/home/peter/Gramps/trunk/gramps/plugins/importer/importxml.py",
line 137, in importData
     info = parser.parse(xml_file, line_cnt, person_cnt)
   File "/home/peter/Gramps/trunk/gramps/plugins/importer/importxml.py",
line 902, in parse
     self.p.ParseFile(ifile)
   File "/home/peter/Gramps/trunk/gramps/plugins/importer/importxml.py",
line 2915, in startElement
     f(attrs)
   File "/home/peter/Gramps/trunk/gramps/plugins/importer/importxml.py",
line 1190, in start_event
     self.update(self.p.CurrentLineNumber)
   File "/home/peter/Gramps/trunk/gramps/gen/updatecallback.py", line
82, in update_real
     newval = int(100 * count/self.total)
ZeroDivisionError: division by zero

But if I use python 2.7 in stead, all is fine, except all
(Gramps.py:4034): Gtk-CRITICAL **: gtk_widget_get_toplevel: assertion
`GTK_IS_WIDGET (widget)' failed


Gramps Settings:
----------------
  python    : 3.3.0
  gramps    : 4.0.0
  gtk++     : 3.6.2
  gobject   : 3.4.2
  Using bsddb3
  bsddb     : 5.3.0
  bsddb.db  : (5, 3, 21)
  cairo     : 1.10.0
  osmgpsmap : not found
  pyexiv2   : not found
  o.s.      : Linux
  kernel    : 3.6.5-desktop-1.mga3

/Peter


------------------------------------------------------------------------------
Keep yourself connected to Go Parallel:
VERIFY Test and improve your parallel project with help from experts
and peers. http://goparallel.sourceforge.net
_______________________________________________
Gramps-devel mailing list
Gramps-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-devel




------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
TUNE You got it built. Now make it sing. Tune shows you how.
http://goparallel.sourceforge.net


_______________________________________________
Gramps-devel mailing list
Gramps-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-devel