Dynamic Web Report error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic Web Report error

Patrice Legoux
Hello Gramps users,

Trying to run Dynamic web report, I've got this error message:

161581355: ERROR: _reportdialog.py: line 748: Failed to run report.
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gui\plug\report\_reportdialog.py", line 709, in report
    my_report.write_report()
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 752, in write_report
    self._export_individuals()
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 871, in _export_individuals
    jdata['events'] = self._data_events(person)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1117, in _data_events
    jdata['text'] = self.get_notes_attributes_text(notelist, attrlist)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1620, in get_notes_attributes_text
    htmllist = self.dump_notes(notelist)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1653, in dump_notes
    notesection.extend(self.get_note_format(this_note))
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1668, in get_note_format
    note.get_type() == NoteType.HTML_CODE)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1694, in styled_note
    split='\n')
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\plug\docbackend\docbackend.py", line 284, in add_markup_from_styled
    tag = self.find_tag_by_stag(s_tag)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\plug\docbackend\docbackend.py", line 221, in find_tag_by_stag
    return self.format_link(s_tag.value)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\plugins\lib\libhtmlbackend.py", line 305, in format_link
    value = self.build_link(prop, handle, obj_class)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 3122, in build_link
    source_handle = self.database.get_citation_from_handle(handle).get_reference_handle()
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\proxy\cache.py", line 119, in get_citation_from_handle
    self.cache_handle[handle] = self.db.get_citation_from_handle(handle)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\proxy\private.py", line 85, in get_citation_from_handle
    citation = self.db.get_citation_from_handle(handle)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\db\generic.py", line 1281, in get_citation_from_handle
    return self._get_from_handle(CITATION_KEY, Citation, handle)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\db\generic.py", line 1263, in _get_from_handle
    raise HandleError('Handle %s not found' % handle)
gramps.gen.errors.HandleError: Handle d7eccb818a15d3a94fdd27db50f not found

Last lines seems to indicate some citation handler is missing soewhere.

I've verified DB without any error then rerun DWR giving me the same issue.

Could someone help me to find and correct reason of that?

Cheers,

Patrice
Gramrps 5.1.0-1, Locale: FR, Windows 10


--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Web Report error

prculley
Judging by the error dump, you have a note that contains a link to a citation that no longer exists.  The Check&Repair utility won't find problems of this sort, as links in notes are not considered to be real db objects with all the cross checking needed to make sure this doesn't happen.

To find the issue, one way would be to export the db to a Gramps XML file (turn off compression) and then use a text editor to search in the XML for the string "d7eccb818a15d3a94fdd27db50" (from the bottom of your error dump).  It should be found in a section something like this:
    <note handle="_e50fbb93356215de00e3b8fe56a" change="1574435928" id="N0000" type="Citation">
      <text>A Note?!
Link!!!</text>
      <style name="link" value="gramps://Citation/handle/e50fbb9acb240595f8e0c6b743a">
        <range start="9" end="16"/>
      </style>
    </note>

The text of the note and the "id=" shows up above the string you find, which would let you go back and edit the note (with the id) in Gramps to remove the bad link.

We should probably fix the DynamicWeb report to ignore errors like this...  But I suspect this would be a widespread issue in other reports as well.

Paul C.

On Fri, Nov 22, 2019 at 7:38 AM Patrice Legoux <[hidden email]> wrote:
Hello Gramps users,

Trying to run Dynamic web report, I've got this error message:

161581355: ERROR: _reportdialog.py: line 748: Failed to run report.
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gui\plug\report\_reportdialog.py", line 709, in report
    my_report.write_report()
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 752, in write_report
    self._export_individuals()
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 871, in _export_individuals
    jdata['events'] = self._data_events(person)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1117, in _data_events
    jdata['text'] = self.get_notes_attributes_text(notelist, attrlist)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1620, in get_notes_attributes_text
    htmllist = self.dump_notes(notelist)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1653, in dump_notes
    notesection.extend(self.get_note_format(this_note))
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1668, in get_note_format
    note.get_type() == NoteType.HTML_CODE)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1694, in styled_note
    split='\n')
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\plug\docbackend\docbackend.py", line 284, in add_markup_from_styled
    tag = self.find_tag_by_stag(s_tag)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\plug\docbackend\docbackend.py", line 221, in find_tag_by_stag
    return self.format_link(s_tag.value)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\plugins\lib\libhtmlbackend.py", line 305, in format_link
    value = self.build_link(prop, handle, obj_class)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 3122, in build_link
    source_handle = self.database.get_citation_from_handle(handle).get_reference_handle()
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\proxy\cache.py", line 119, in get_citation_from_handle
    self.cache_handle[handle] = self.db.get_citation_from_handle(handle)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\proxy\private.py", line 85, in get_citation_from_handle
    citation = self.db.get_citation_from_handle(handle)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\db\generic.py", line 1281, in get_citation_from_handle
    return self._get_from_handle(CITATION_KEY, Citation, handle)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\db\generic.py", line 1263, in _get_from_handle
    raise HandleError('Handle %s not found' % handle)
gramps.gen.errors.HandleError: Handle d7eccb818a15d3a94fdd27db50f not found

Last lines seems to indicate some citation handler is missing soewhere.

I've verified DB without any error then rerun DWR giving me the same issue.

Could someone help me to find and correct reason of that?

Cheers,

Patrice
Gramrps 5.1.0-1, Locale: FR, Windows 10
--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Web Report error

Patrice Legoux
Yeah ! It's working fine now !

Thank you Paul.

Le ven. 22 nov. 2019 à 16:28, Paul Culley <[hidden email]> a écrit :
Judging by the error dump, you have a note that contains a link to a citation that no longer exists.  The Check&Repair utility won't find problems of this sort, as links in notes are not considered to be real db objects with all the cross checking needed to make sure this doesn't happen.

To find the issue, one way would be to export the db to a Gramps XML file (turn off compression) and then use a text editor to search in the XML for the string "d7eccb818a15d3a94fdd27db50" (from the bottom of your error dump).  It should be found in a section something like this:
    <note handle="_e50fbb93356215de00e3b8fe56a" change="1574435928" id="N0000" type="Citation">
      <text>A Note?!
Link!!!</text>
      <style name="link" value="gramps://Citation/handle/e50fbb9acb240595f8e0c6b743a">
        <range start="9" end="16"/>
      </style>
    </note>

The text of the note and the "id=" shows up above the string you find, which would let you go back and edit the note (with the id) in Gramps to remove the bad link.

We should probably fix the DynamicWeb report to ignore errors like this...  But I suspect this would be a widespread issue in other reports as well.

Paul C.

On Fri, Nov 22, 2019 at 7:38 AM Patrice Legoux <[hidden email]> wrote:
Hello Gramps users,

Trying to run Dynamic web report, I've got this error message:

161581355: ERROR: _reportdialog.py: line 748: Failed to run report.
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gui\plug\report\_reportdialog.py", line 709, in report
    my_report.write_report()
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 752, in write_report
    self._export_individuals()
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 871, in _export_individuals
    jdata['events'] = self._data_events(person)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1117, in _data_events
    jdata['text'] = self.get_notes_attributes_text(notelist, attrlist)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1620, in get_notes_attributes_text
    htmllist = self.dump_notes(notelist)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1653, in dump_notes
    notesection.extend(self.get_note_format(this_note))
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1668, in get_note_format
    note.get_type() == NoteType.HTML_CODE)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 1694, in styled_note
    split='\n')
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\plug\docbackend\docbackend.py", line 284, in add_markup_from_styled
    tag = self.find_tag_by_stag(s_tag)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\plug\docbackend\docbackend.py", line 221, in find_tag_by_stag
    return self.format_link(s_tag.value)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\plugins\lib\libhtmlbackend.py", line 305, in format_link
    value = self.build_link(prop, handle, obj_class)
  File "C:\Users\1\AppData\Roaming\gramps\gramps51\plugins\DynamicWeb\dynamicweb.py", line 3122, in build_link
    source_handle = self.database.get_citation_from_handle(handle).get_reference_handle()
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\proxy\cache.py", line 119, in get_citation_from_handle
    self.cache_handle[handle] = self.db.get_citation_from_handle(handle)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\proxy\private.py", line 85, in get_citation_from_handle
    citation = self.db.get_citation_from_handle(handle)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\db\generic.py", line 1281, in get_citation_from_handle
    return self._get_from_handle(CITATION_KEY, Citation, handle)
  File "C:\Program Files\GrampsAIO64-5.1.0\gramps\gen\db\generic.py", line 1263, in _get_from_handle
    raise HandleError('Handle %s not found' % handle)
gramps.gen.errors.HandleError: Handle d7eccb818a15d3a94fdd27db50f not found

Last lines seems to indicate some citation handler is missing soewhere.

I've verified DB without any error then rerun DWR giving me the same issue.

Could someone help me to find and correct reason of that?

Cheers,

Patrice
Gramrps 5.1.0-1, Locale: FR, Windows 10
--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org


--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org