Bug report #6529

Metadata test does not warn about missing email in init

Added by Tim Sutton over 11 years ago. Updated over 11 years ago.

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

Description

I tried to upload our plugin and got:

{{{
There were errors reading plugin package (please check also your plugin's metadata).
qgisMinimumVersion is set to less than 1.8 (1.7) and there were errors reading metadata
from the init.py file. This can lead to errors in versions of QGIS less than 1.8,
please either set the qgisMinimumVersion to 1.8 or specify the metadata also in the
init.py file. Reported error was: Cannot find metadata qgisMinimumVersion in
metadata source (init.py).
Please bear in mind that the current implementation of the init.py validator is
based on regular expressions, check that your metadata functions directly return metadata
values as strings.
For further informations about metadata parsing in this application, please see:
metadata documentation
}}}

Actually the init.py does contain the metadata. I made some tests and it seems that
it was caused by the qgisMinimumVersion function having a multiline docstring.

It would be nice to get a more meaningful message as I had to resort to copying code
from the validator class and debugging through the parsing of my init before I
could figure out what was wrong.

Thanks

Tim

History

#1 Updated by Alessandro Pasotti over 11 years ago

Thanks for reporting this issue Tim and for finding the cause of the problem, feel free to suggest the "more meaningful" message and I will be happy to cut&paste it the code.

I'm not particularly good in English writings, and couldn't imagine something different that "can't find meetada xxx in init.py", maybe better s/find/read/ ?

The explanation is IMHO very complete (meaningful), it says that it does a check for qgsMinimumVersion and if < 1.8 search for required metadata in init.py and can't find one of those.

Also, can you please attach the plugin which gave you the error?

BTW, copying code from the validator for testing was the right way to go, do you have any other suggestion about making the parsing more robust? I've changed it during the last HF and I hoped it was more robust but probably it isn't.

#2 Updated by Alessandro Pasotti over 11 years ago

I just noticed that the title of this ticket has not much to do with the text. Chan you please also give some notes about the problem whith email metadata or file another ticket for that?

#3 Updated by Alessandro Pasotti over 11 years ago

  • Status changed from Open to Feedback

I need the plugin to reproduce the problem.

#4 Updated by Alessandro Pasotti over 11 years ago

  • Status changed from Feedback to Closed

No feedback.

Also available in: Atom PDF