[Qgis-developer] [Python plugin] handle error conditions
Tim Sutton
tim at linfiniti.com
Tue Aug 5 12:15:14 EDT 2008
Hi Anne
I tried to run your plugin (downloaded last week) but when QGIS starts I get:
Couldn't load plugin "pluginProva" from
['/home/timlinux/apps/share/qgis/python',
'/home/timlinux/.qgis//python/plugins',
'/home/timlinux/apps/share/qgis/python/plugins', '/home/timlinux',
'/home/timlinux/dev/python/lib', '/usr/lib/python25.zip',
'/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/Numeric',
'/usr/lib/python2.5/site-packages/PIL',
'/usr/lib/python2.5/site-packages/gst-0.10',
'/var/lib/python-support/python2.5',
'/usr/lib/python2.5/site-packages/gtk-2.0',
'/var/lib/python-support/python2.5/gtk-2.0']
Here is what I have checked out and where the plugin is installed:
[pluginProva] pwd
/home/timlinux/.qgis/python/plugins/pluginProva
[pluginProva] svn info
Path: .
URL: svn://home.prea.net/svn/GSoC/pluginProva
Repository Root: svn://home.prea.net/svn
Repository UUID: 60e9be08-f12e-11dc-b9d3-6b2ab16386f6
Revision: 78
Node Kind: directory
Schedule: normal
Last Changed Author: anne
Last Changed Rev: 76
Last Changed Date: 2008-07-31 11:53:12 +0200 (Thu, 31 Jul 2008)
Regards
Tim
2008/8/5 Anne Ghisla <a.ghisla at studenti.uninsubria.it>:
> Hello all, and especially Python plugin developers,
>
> The plugin for home range analysis is now almost ready, but success of
> execution depends on correct parameters given by the user, otherwise it
> raises Python errors or gives the false idea that everything is going
> fine.
> I'm trying to handle some potential errors as soon as possible.
> The worst error source is that there is no (point) layer available. For
> the moment I let QGIS print a warning into console and raise a
> QMessageBox.
> Is it possible from the __init__ method of the interface to abort window
> drawing? If I call the interface close() method, the interface gets
> drawn anyway.
> It will be fine if the user calls the method from menu, gets a message
> box about lack of layers, and nothing else after.
>
> Significant part of the code is here:
> http://rafb.net/p/0G3Wiw24.html
>
> lines 23 (call), 55.
>
> thanks in advance for any hint!
>
> Anne Ghisla
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
--
Tim Sutton
QGIS Project Steering Committee Member - Release Manager
Visit http://qgis.org for a great open source GIS
Blog: http://tim.linfiniti.com
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
More information about the Qgis-developer
mailing list