Bug report #7005

Misleading error message

Added by Riccardo Lemmi almost 12 years ago. Updated almost 12 years ago.

Status:Closed
Priority:Normal
Assignee:Alessandro Pasotti
Category:-
Pull Request or Patch supplied:No

Description

Hi,
I tried to add a plugin (permaclim) and the server said: Cannot find metadata email in metadata source (init.py).
The email method was in the code then I discovered that the problem was the missing metadata.txt file.

permaclim.zip (11.1 KB) Riccardo Lemmi, 2013-01-17 08:00 AM

History

#1 Updated by Alessandro Pasotti almost 12 years ago

Please attach the plugin for testing.

#2 Updated by Riccardo Lemmi almost 12 years ago

This is the version without the metadata.txt file.

#3 Updated by Alessandro Pasotti almost 12 years ago

  • Assignee set to Alessandro Pasotti
  • Status changed from Open to Closed

the problem is caused by author not returning a quoted string, see:

https://github.com/qgis/qgis-django/blob/master/qgis-app/plugins/docs/metadata.rst

the parser misses email which is the following field.

Cited from a.m. documentation:

To avoid direct execution of python code (which would be a security issue), metadata are read from the init.py file with a simple regular expression parser which extracts the string values returned by the functions inside the init.py file, this means that if the functions do not return strings (enclosed in single or double quotes) or a boolean value (for the experimental entry), the metadata entry for that function will not be extracted and if the metadata is mandatory the plugin will be considered invalid.

Also available in: Atom PDF