Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#2559 closed defect (fixed)

g.gui.metadata not functioning

Reported by: pvanbosgeo Owned by: grass-dev@…
Priority: normal Milestone: 7.2.0
Component: wxGUI Version: svn-trunk
Keywords: addons, metadata Cc:
CPU: Unspecified Platform: Unspecified

Description

Different error messages depending on what type of data is involved (raster or vector):

rasters: Editing or creating metadata files seems impossible, see first error message.

Traceback (most recent call last):
  File "/home/paulo/.grass7/addons/scripts/g.gui.metadata",
line 1031, in onEdit
    ok = self.GetParent().onEditMapMetadata()
  File "/home/paulo/.grass7/addons/scripts/g.gui.metadata",
line 257, in onEditMapMetadata
    self.mdCreator.createGrassBasicISO()
  File "/home/paulo/.grass7/addons/etc/mdlib/mdgrass.py",
line 186, in createGrassBasicISO
    self.md.identification.title =
mdutil.replaceXMLReservedChar(self.md_grass['title'])
KeyError: 'title'

Vectors: Problem differs depending on whether the layer exist:

1) Using the edit button for a layer for which there is no metadata file yet results in an error message (below). Note that notwithstanding the message, the /basicTemplate.xml is present in the templates folder. 2) If there is a metadata file, but I select another template, I get the error message as below 3) If there is a metadata file, and I select the template in which that metadata was written, the window to edit opens and I can edit. I can however not save the edits.

Traceback (most recent call last):
  File "/home/paulo/.grass7/addons/scripts/g.gui.metadata",
line 1031, in onEdit
    ok = self.GetParent().onEditMapMetadata()
  File "/home/paulo/.grass7/addons/scripts/g.gui.metadata",
line 259, in onEditMapMetadata
    self.xmlPath =
self.mdCreator.saveXML(self.mdDestination,
self.nameTMPteplate, self)
  File "/home/paulo/.grass7/addons/etc/mdlib/mdgrass.py",
line 346, in saveXML
    template = env.get_template(self.template)
  File "/usr/lib/python2.7/dist-
packages/jinja2/environment.py", line 791, in get_template
    return self._load_template(name,
self.make_globals(globals))
  File "/usr/lib/python2.7/dist-
packages/jinja2/environment.py", line 765, in _load_template
    template = self.loader.load(self, name, globals)
  File "/usr/lib/python2.7/dist-packages/jinja2/loaders.py",
line 113, in load
    source, filename, uptodate =
self.get_source(environment, name)
  File "/usr/lib/python2.7/dist-packages/jinja2/loaders.py",
line 178, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound:
/home/paulo/.grass7/addons/etc/templates/basicTemplate.xml

Change History (3)

comment:1 by martinl, 10 years ago

Keywords: addons metadata added
Milestone: 7.1.0

comment:2 by krejcmat, 9 years ago

Resolution: fixed
Status: newclosed

Fixed during GSOC2015.

Last edited 9 years ago by krejcmat (previous) (diff)

comment:3 by neteler, 9 years ago

Milestone: 7.1.07.2.0

Milestone renamed

Note: See TracTickets for help on using tickets.