Re: [Qgis-user] plugin helloworld 1.5

2013-07-29 Thread Borys Jurgiel
Dnia poniedziaƂek, 29 lipca 2013 o 07:14:05 Su Hartono napisaƂ(a):
 I use OS Ubuntu 12.04.
 I got Error loading plugin
 The plugin is broken.  Python said:
 'module' object has no attribute 'classFactory'.
 How to fix it ?
 -- thank you--
 Suhartono

There is a bug in the plugin so the __init__.py file is empty. Just add 
following simple function to it (mind the indentation): 

def classFactory(iface):
  from HelloWorld import HelloWorld
  return HelloWorld(iface)

You can also use that file from the 1.0 version. For more information look at 
the PyQGIS cookbook [1]. 

Btw. note for QGIS 1.8 you need to put plugin metadata to both: __init__.py 
and metadata.txt files. From QGIS 2.0 the only place to put the metadata is the 
metadata.txt file. The __init__.py should only contain the classFactory 
function.

[1] http://www.qgis.org/pyqgis-cookbook/plugins.html#plugins
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] plugin helloworld 1.5

2013-07-28 Thread Su Hartono
I use OS Ubuntu 12.04.
I got Error loading plugin
The plugin is broken.  Python said:
'module' object has no attribute 'classFactory'.
How to fix it ?
-- thank you--
Suhartono
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user