planetfederal / qgis-webappbuilder-plugin

GNU General Public License v3.0
18 stars 20 forks source link

AttributeError: 'NoneType' object has no attribute 'deepcopy' #82

Open luipir opened 8 years ago

luipir commented 8 years ago

Happn during loading the plugin the first time


Couldn't load plugin webappbuilder due to an error when calling its classFactory() method

Traceback (most recent call last): File "/home/ginetto/PROGRAMMING/QGIS/QGIS-2.8/build/output/python/qgis/utils.py", line 219, in startPlugin plugins[packageName] = package.classFactory(iface) File "/home/ginetto/.qgis2/python/plugins/webappbuilder/init.py", line 9, in classFactory from webappbuilder import WebAppBuilderPlugin File "/home/ginetto/PROGRAMMING/QGIS/QGIS-2.8/build/output/python/qgis/utils.py", line 478, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/ginetto/.qgis2/python/plugins/webappbuilder/webappbuilder.py", line 6, in from maindialog import MainDialog File "/home/ginetto/PROGRAMMING/QGIS/QGIS-2.8/build/output/python/qgis/utils.py", line 478, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/ginetto/.qgis2/python/plugins/webappbuilder/maindialog.py", line 10, in from appcreator import createApp, AppDefProblemsDialog, loadAppdef, saveAppdef, checkAppCanBeCreated File "/home/ginetto/PROGRAMMING/QGIS/QGIS-2.8/build/output/python/qgis/utils.py", line 478, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/ginetto/.qgis2/python/plugins/webappbuilder/appcreator.py", line 3, in from appwriter import writeWebApp File "/home/ginetto/PROGRAMMING/QGIS/QGIS-2.8/build/output/python/qgis/utils.py", line 478, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/ginetto/.qgis2/python/plugins/webappbuilder/appwriter.py", line 10, in from settings import * File "/home/ginetto/PROGRAMMING/QGIS/QGIS-2.8/build/output/python/qgis/utils.py", line 478, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/ginetto/.qgis2/python/plugins/webappbuilder/settings.py", line 59, in webAppWidgets = loadWidgets() File "/home/ginetto/.qgis2/python/plugins/webappbuilder/settings.py", line 24, in loadWidgets obj = c[1]() File "/home/ginetto/.qgis2/python/plugins/webappbuilder/webbappwidget.py", line 14, in init self.defaultParameters = copy.deepcopy(self._parameters) AttributeError: 'NoneType' object has no attribute 'deepcopy'

volaya commented 8 years ago

How can the copy object be None if the module is correctly imported?strange...

luipir commented 8 years ago

yes... really strange

I hope there are no side effects of virtualenvs... this tests are without virtualenv active and no other plugin installed.

investigating. Probably my problem... reassigned to me

luipir commented 8 years ago

Happen sonly when the plugin is reloaded... not to a clean run of qgis witht the plugin already active!

investigating

luipir commented 8 years ago

I can reproduce the error in this way

CONTEXT: no plugin available otrher than Web App Builder

CASE 1: (first installation... plugin is not active) 1) start qgis 2) WAP is not a active plugin => activate it in Plugin Manager 3) deactivate in plugin manager 4) activate again in plugin manager => generate the error

CASE 2: (Plugin was already active) 1) start qgis => no error 3) deactivate in plugin manager 4) activate again in plugin manager => generate the error

luipir commented 8 years ago

hmmmm... solution is almost a workaround. we diddn't find why this happen.

we should investigate more to avoid side effects.

there a way to leave the tiket "half opened" or "half closed"?

volaya commented 8 years ago

let's leave it open as a reminder

luipir commented 8 years ago

something weird happening... after reload this is the error when I try to run the plugin. Seems related to this issue:

exception is shown in the Python console

Traceback (most recent call last): File "/home/ginetto/.qgis2/python/plugins/webappbuilder/webappbuilder.py", line 40, in run dlg = MainDialog(appdef) File "/home/ginetto/.qgis2/python/plugins/webappbuilder/maindialog.py", line 41, in init self.populateWidgets() File "/home/ginetto/.qgis2/python/plugins/webappbuilder/maindialog.py", line 248, in populateWidgets button.setIcon(w.icon()) File "/home/ginetto/.qgis2/python/plugins/webappbuilder/webbappwidget.py", line 17, in icon return QIcon(os.path.join(os.path.dirname(file), "icons", "puzzle.png")) AttributeError: 'NoneType' object has no attribute 'path'

volaya commented 8 years ago

yes, it's the same thing but for the os module...

I wasn't getting that, but it seems that all that is not in the class object is not available

This might be due to how the class object is instantiated

On Fri, Oct 30, 2015 at 10:38 AM, Luigi Pirelli notifications@github.com wrote:

something weird happening... after reload this is the error when I try to run the plugin. Seems related to this issue:

exception is shown in the Python console

Traceback (most recent call last): File "/home/ginetto/.qgis2/python/plugins/webappbuilder/webappbuilder.py", line 40, in run dlg = MainDialog(appdef) File "/home/ginetto/.qgis2/python/plugins/webappbuilder/maindialog.py", line 41, in init self.populateWidgets() File "/home/ginetto/.qgis2/python/plugins/webappbuilder/maindialog.py", line 248, in populateWidgets button.setIcon(w.icon()) File "/home/ginetto/.qgis2/python/plugins/webappbuilder/webbappwidget.py", line 17, in icon return QIcon(os.path.join(os.path.dirname(file), "icons", "puzzle.png")) AttributeError: 'NoneType' object has no attribute 'path'

— Reply to this email directly or view it on GitHub https://github.com/boundlessgeo/qgis-app-builder/issues/82#issuecomment-152473630 .

Victor Olaya Software Engineer | Boundless http://boundlessgeo.com/ volaya@boundlessgeo.com @boundlessgeo http://twitter.com/boundlessgeo/