Using a namespaced field or a field containing a space character within a template substitution causes guano_edit.py to fail with the following exception:
Traceback (most recent call last):
File "./bin/guano_edit.py", line 95, in <module>
main()
File "./bin/guano_edit.py", line 91, in main
update(gfile, md, dry_run=DRY_RUN)
File "./bin/guano_edit.py", line 69, in update
gfile[k] = Template(v).substitute(gfile)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/string.py", line 176, in substitute
return self.pattern.sub(convert, self.template)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/string.py", line 173, in convert
self._invalid(mo)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/string.py", line 146, in _invalid
(lineno, colno))
ValueError: Invalid placeholder in string: line 1, col 1
Examples:
$> guano_edit.py 'Species Auto ID: ${SB|AutoID} foo/bar/*.wav
$> guano_edit.py 'Note: Recorded at ${Loc Position} by me.' foo/bar/*.wav
The class attribute string.Template.idpattern is a regular expression responsible for validating template patterns.
Using a namespaced field or a field containing a space character within a template substitution causes
guano_edit.py
to fail with the following exception:Examples:
$> guano_edit.py 'Species Auto ID: ${SB|AutoID} foo/bar/*.wav
$> guano_edit.py 'Note: Recorded at ${Loc Position} by me.' foo/bar/*.wav
The class attribute
string.Template.idpattern
is a regular expression responsible for validating template patterns.