fixed.
Was due to not running it in English, and definitions are in English, so care must be taken not to translate before loading fields of a template


2013/6/27 Benny Malengier <benny.malengier@gmail.com>
I cannot reproduce.
svn up and try again, I improved the error message so as to know what field gives the error.
Let me know the error after that.

At the moment defaults are not ok, but the error would indicate you have a specific source template that contains a field that is not SrcAttributeType.
Any idea what template?
I changed template handling, and enforce that fields are SrctAttributeType. Default at the moment often is that template is not recognized. I need to work on the upgrade code to avoid this, but will first do a database change.

Benny


2013/6/27 Enno Borgsteede <ennoborg@gmail.com>
When I try to add a source, I get an exception:

2013-06-27 17:55:31.347: ERROR: grampsapp.py: line 114: Unhandled exception
Traceback (most recent call last):
   File
"/home/test/gep-018-evidence-style/gramps/plugins/view/sourceview.py",
line 202, in add
     EditSource(self.dbstate, self.uistate, [], Source())
   File
"/home/test/gep-018-evidence-style/gramps/gui/editors/editsource.py",
line 113, in __init__
     dbstate.db.get_source_from_gramps_id, callback)
   File
"/home/test/gep-018-evidence-style/gramps/gui/editors/editprimary.py",
line 85, in __init__
     self._setup_fields()
   File
"/home/test/gep-018-evidence-style/gramps/gui/editors/editsource.py",
line 307, in _setup_fields
     self.update_attr()
   File
"/home/test/gep-018-evidence-style/gramps/gui/editors/editsource.py",
line 357, in update_attr
     self.srctemp = SrcTemplate(self.obj.get_source_template()[0])
   File
"/home/test/gep-018-evidence-style/gramps/gen/lib/srcattrbase.py", line
76, in get_source_template
     retval = (templ, SrcTemplate.template_description(templ))
   File
"/home/test/gep-018-evidence-style/gramps/gen/lib/srctemplate.py", line
320, in template_description
     SrcTemplate.check_loaded()
   File
"/home/test/gep-018-evidence-style/gramps/gen/lib/srctemplate.py", line
295, in check_loaded
     EVIDENCETEMPLATES.update(load_srctemplates_data())
   File
"/home/test/gep-018-evidence-style/gramps/gen/lib/srctemplate.py", line
129, in load_srctemplates_data
     templatemap.update(load_srctemplate_csv(csvfile))
   File
"/home/test/gep-018-evidence-style/gramps/gen/lib/srctemplate.py", line
202, in load_srctemplate_csv
     raise NotImplementedError, "field must be a known SrcAttributeType"
NotImplementedError: field must be a known SrcAttributeType

Database is empty.

thanks,

Enno


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Gramps-devel mailing list
Gramps-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-devel