6256: Can't create graph reports
svn: r21012
This commit is contained in:
parent
f14b5d8944
commit
83fdd19efe
@ -598,7 +598,10 @@ class GVDotDoc(GVDocBase):
|
||||
if self._filename[-3:] != ".gv":
|
||||
self._filename += ".gv"
|
||||
|
||||
dotfile = open(self._filename, "w")
|
||||
if sys.version_info[0] < 3:
|
||||
dotfile = open(self._filename, "w")
|
||||
else:
|
||||
dotfile = open(self._filename, "wb")
|
||||
dotfile.write(self._dot.getvalue())
|
||||
dotfile.close()
|
||||
|
||||
|
@ -47,6 +47,7 @@ from functools import partial
|
||||
# GRAMPS modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from gramps.gen.constfunc import conv_to_unicode
|
||||
from gramps.gen.plug.menu import (BooleanOption, EnumeratedListOption, FilterOption,
|
||||
PersonOption, ColorOption)
|
||||
from gramps.gen.plug.report import Report
|
||||
@ -172,7 +173,8 @@ class RelGraphReport(Report):
|
||||
children
|
||||
"""
|
||||
# Hash people in a dictionary for faster inclusion checking
|
||||
person_dict = dict([handle, 1] for handle in self.person_handles)
|
||||
person_dict = dict([conv_to_unicode(handle, 'utf-8'), 1]
|
||||
for handle in self.person_handles)
|
||||
|
||||
for person_handle in self.person_handles:
|
||||
person = self.database.get_person_from_handle(person_handle)
|
||||
@ -182,7 +184,7 @@ class RelGraphReport(Report):
|
||||
father_handle = family.get_father_handle()
|
||||
mother_handle = family.get_mother_handle()
|
||||
for child_ref in family.get_child_ref_list():
|
||||
if child_ref.ref == person_handle:
|
||||
if child_ref.ref == conv_to_unicode(person_handle, 'utf-8'):
|
||||
frel = child_ref.frel
|
||||
mrel = child_ref.mrel
|
||||
break
|
||||
@ -241,7 +243,7 @@ class RelGraphReport(Report):
|
||||
(shape, style, color, fill) = self.get_gender_style(person)
|
||||
url = ""
|
||||
if self.includeurl:
|
||||
h = person_handle
|
||||
h = conv_to_unicode(person_handle, 'utf-8')
|
||||
dirpath = "ppl/%s/%s" % (h[-1], h[-2])
|
||||
dirpath = dirpath.lower()
|
||||
url = "%s/%s.html" % (dirpath, h)
|
||||
|
Loading…
Reference in New Issue
Block a user