Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
luipir opened this issue Oct 28, 2015 · 8 comments
Open

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

luipir opened this issue Oct 28, 2015 · 8 comments
Assignees

Comments

@luipir
Copy link
Contributor

luipir commented Oct 28, 2015

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 = c1
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
Copy link
Contributor

volaya commented Oct 28, 2015

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

@luipir luipir assigned luipir and unassigned volaya Oct 28, 2015
@luipir
Copy link
Contributor Author

luipir commented Oct 28, 2015

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
Copy link
Contributor Author

luipir commented Oct 28, 2015

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

investigating

@luipir
Copy link
Contributor Author

luipir commented Oct 28, 2015

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
  2. deactivate in plugin manager
  3. activate again in plugin manager => generate the error

@luipir
Copy link
Contributor Author

luipir commented Oct 30, 2015

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
Copy link
Contributor

volaya commented Oct 30, 2015

let's leave it open as a reminder

@volaya volaya reopened this Oct 30, 2015
@luipir
Copy link
Contributor Author

luipir commented Oct 30, 2015

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
Copy link
Contributor

volaya commented Oct 30, 2015

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 [email protected]
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
#82 (comment)
.

Victor Olaya
Software Engineer | Boundless http://boundlessgeo.com/
[email protected]
@boundlessgeo http://twitter.com/boundlessgeo/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants