2012/11/29 Benny Malengier <benny.malengier@gmail.com>

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:

    File "/home/peter/Gramps/trunk/gramps/gen/updatecallback.py", line
82, in update_real
     newval = int(100 * count/self.total)
ZeroDivisionError: division by zero

if self.total is zero, newval should be 0 and no division done.

Benny


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