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

Quantum GIS qgis at qgis.org
Sat Mar 5 07:33:02 EST 2011


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

  * status:  new => closed
  * resolution:  => invalid


Comment:

 As the message says, it's a Python syntax error, not a Qgis restriction.
 Python modules can't contain dashes and when you try to import this plugin
 (what is a python module in fact), Python raises the syntax error and Qgis
 only passes that message to the gui. I'm closing the ticket as I think
 Qgis shouldn't analyze and validate Python syntax :) Please reopen if you
 disagree.

 In general, the module name (=the plugin directory name) must meet Python
 requirements, so can't contain dashes, dots etc. The zip file name must be
 either moduleName.zip or moduleName.anySuffix.zip The suffix allows you to
 keep a few plugin versions in one directory in the repo, for example:
 myplugin.stable.zip and myplugin.dev.zip; the latter sghould be marked as
 experimental.

 They both will be installed under the same moduleName name (one covers
 another), depending on the experimental switch state in the Installer. So
 the user can easily test the dev version and revert to the stable one.

 If you want be able to *install* different versions side by side, you must
 use different moduleNames. But please only do it if necessery and use
 _stable and _dev suffixes rather than particular numbers, otherwise users
 will be flooded by depreciated modules with no hope to update :)

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/3145#comment:4>
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