[QGIS-trac] Re: [Quantum GIS] #3145: Dash in plugin name causes unhelpful error message

Quantum GIS qgis at qgis.org
Fri Oct 22 13:59:06 EDT 2010


#3145: Dash in plugin name causes unhelpful error message
------------------------------------------------+---------------------------
   Reporter:  rehakv1                           |              Owner:  borysiasty   
       Type:  bug                               |             Status:  new          
   Priority:  major: does not work as expected  |          Milestone:  Version 1.6.0
  Component:  Python plugins and bindings       |            Version:  Trunk        
   Keywords:                                    |   Platform_version:               
   Platform:  All                               |           Must_fix:  No           
Status_info:  0                                 |  
------------------------------------------------+---------------------------

Comment(by rehakv1):

 > You should rename your plugin folder and package to "dash_test" because
 the chars after the dash in the package name are used for release name or
 version (e.g "dash_test-dev.zip" or "dash_test-1.0.zip").Instead the
 folder name must be truncated before the dash (i.e. "dash_test" in both
 the above cases).

 Yes, I figured this out and renamed my plugin folder. I also removed the
 version number based on this observation. Is there any recomendation or
 best practice guide for plugin naming? I see that e.g. the plugin in
 Faunalia repo don't add version number to the zip file.

 > The error message is for users, not for developers. IMHO users don't
 want to know why the package is broken.

 Sorry, but I don't think this a good reasoning. The error message "The
 plugin is broken. Python said: invalid syntax" has no meaning to a regular
 user. And the developer has no chance to find out what's wrong with the
 plugin. I spent more than hour reviewing my source code because I thought
 there was a syntax error in my Python code. If the error was "Invalid
 filename" or even better "Invalid filename - allowed characters are
 alphanumeric symbols and underscore" I would have fixed it in 5 minutes.

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/3145#comment:2>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list