#2559: g.gui.metadata not functioning
-------------------------+--------------------------------------------------
 Reporter:  pvanbosgeo   |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:                           
Component:  wxGUI        |     Version:  svn-trunk                
 Keywords:               |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
 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

 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2559>
GRASS GIS <http://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to