Bug report #4861

Error when uploading plugin

Added by Alexander Bruy over 12 years ago. Updated about 12 years ago.

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

Description

Can't upload plugin (see attachment) to the new repository manually or using plugin_uploader.py script.
When I upload it manually I get next error:

"There were errors reading plugin package (please check also your plugin's metadata). qgisMinimumVersion is set to less
than 1.8 (1.0.0) 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." 

But qgisMinimumVersion exists in both init.py and metadata.txt files. I can upload package only when set qgisMinimumVersion to "1.8.0".

When uploading same package with plugin_uploader.py I get next error:

reply: 'HTTP/1.1 200 OK\
\
'
header: Date: Mon, 23 Jan 2012 13:42:50 GMT
header: Server: Apache
header: Vary: Cookie,Accept-Encoding
header: Set-Cookie: sessionid=9c45bca8abf539fbd74db4274d8241ac;
expires=Mon, 06-Feb-2012 13:42:51 GMT; Max-Age=1209600; Path=/
header: Connection: close
header: Content-Type: text/xml
body: "<?xml version='1.0'?>\
<methodResponse>\
<fault>\
<value><struct>\
<member>\
<name>faultCode</name>\

<value><int>1</int></value>\
</member>\
<member>\
<name>faultString</name>\
<value><string>&lt;type
'exceptions.NameError'&gt;:global name '_' is not
defined</string></value>\
</member>\
</struct></value>\
</fault>\
</methodResponse>\
" 
A fault occurred
Fault code: 1
Fault string: <type 'exceptions.NameError'>:global name '_' is not defined

shiftpoints.experimental.zip - Plugin package (25.6 KB) Alexander Bruy, 2012-01-23 08:24 AM

History

#1 Updated by Alessandro Pasotti over 12 years ago

  • Assignee set to Alessandro Pasotti
  • Status changed from Open to In Progress

As the message says:

"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."

this is what causes the error (in init.py):

def version():
return mVersion

I'm leaving the ticket open since I check for the upload problem (which should report a better message anyway)

#2 Updated by Alessandro Pasotti over 12 years ago

  • Status changed from In Progress to Resolved

The upload problem is also fixed, now you should see the full error message as the fault string when you upload the invalid plugin.

#3 Updated by Paolo Cavallini about 12 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF