3

I receive the following error when I start QGIS:

Couldn't load plugin 'processing' from ['/usr/share/qgis/python', '/home/v/.qgis2/python', '/home/v/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/site-packages/gst-0.10', '/usr/lib/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages/wx-3.0-gtk2', '/home/v/.qgis2/python/plugins/mmqgis/forms', '/usr/share/qgis/python/plugins/fTools/tools']

Traceback (most recent call last):
File "/usr/share/qgis/python/qgis/utils.py", line 182, in loadPlugin
__import__(packageName)
File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/usr/share/qgis/python/plugins/processing/__init__.py", line 29, in 
from processing.tools.general import *
File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/usr/share/qgis/python/plugins/processing/tools/general.py", line 29, in 
from processing.core.Processing import Processing
File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/usr/share/qgis/python/plugins/processing/core/Processing.py", line 55, in 
from processing.r.RAlgorithmProvider import RAlgorithmProvider
File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/usr/share/qgis/python/plugins/processing/r/RAlgorithmProvider.py", line 34, in 
from processing.gui.EditScriptAction import EditScriptAction
File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/usr/share/qgis/python/plugins/processing/gui/EditScriptAction.py", line 29, in 
from processing.gui.ScriptEditorDialog import ScriptEditorDialog
File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/usr/share/qgis/python/plugins/processing/gui/ScriptEditorDialog.py", line 42, in 
from processing.gui.ScriptEdit import ScriptEdit
File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/usr/share/qgis/python/plugins/processing/gui/ScriptEdit.py", line 36, in 
from processing.gui.LexerR import LexerR
File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/usr/share/qgis/python/plugins/processing/gui/LexerR.py", line 34, in 
class LexerR(QsciLexerCustom):
NameError: name 'QsciLexerCustom' is not defined

Python version:
2.7.6 (default, Feb 15 2014, 23:06:13) 
[GCC 4.8.2 20140206 (prerelease)]


QGIS version: 
2.3.0-Master Master, ccde1d4

Python path: ['/usr/share/qgis/python', u'/home/v/.qgis2/python', u'/home/v/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/site-packages/gst-0.10', '/usr/lib/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages/wx-3.0-gtk2', '/home/v/.qgis2/python/plugins/mmqgis/forms', '/usr/share/qgis/python/plugins/fTools/tools']

First, I don't know anything about python, so forgive me if the information I provide is a bit random and don't hesitate to ask more. I also do not know how to define something in python but at first sight and from my limited understanding, it seemed pretty well defined:

Indeed, in /usr/share/qgis/python/plugins/processing/gui/ the LexerR.py file specifies:
from PyQt4.Qsci import *

In /usr/share/sip/PyQt4/Qsci/ there is a qscilexercustom.sip file specifying:
'#include'

and the file qscilexercustom.h exists in the /usr/include/qt4/Qsci/ folder.

I had QGIS 2.0 before, with the same issue, and installed this development version with the faint hope that it might solve my problem.
Would you have any idea how to solve this issue?


UPDATE

Here is what I get when I try to import PyQt4.Qsci: RuntimeError: the sip module implements API v11.0 but the PyQt4.Qsci module requires API v10.1

So I guess now I'll try to downgrade sip, though I had to install sipdev to compile QGIS.


UPDATE 2

Downgrading sip wasn't such a good idea since it is required by PyQt4. Here's is what I get when I try to launch QGIS:

Couldn't load PyQt4.
Python support will be disabled.


Traceback (most recent call last):
File "", line 1, in 
RuntimeError: the sip module implements API v10.0 to v10.1 but the PyQt4.QtCore module requires API v11.0

Same when I try to import PyQt4.Qsci from Python:

  RuntimeError: the sip module implements API v10.0 to v10.1 but the PyQt4.QtCore module requires API v11.0

Note that python-qscintilla, python-qscintilla-common, python2-qscintilla and qscintilla are all installed in version 2.8-1.

Any ideas?

  • Looks like something is borken with your sip/PyQt/QScintilla2 setup. It seems like you may have multiple modules installed, or the package for Qsci 2.8-1 is built against the wrong sip. It also looks like python-qscintilla and python2-qscintilla are conflicting packages (maybe that's newer Python 3 support). QGIS uses Python 2.x (2.7 recommended). I would say, your best bet is to remove all sip/PyQt/QScintilla2 packages and verify there are no remnants in site-packages. Then, cleanly install those packages again. – dakcarto Mar 3 '14 at 20:18
  • So I've tried to do this. Removing all sip/PyQt/QScintilla2 packages uninstalled plenty stuff, including QGIS. I then reinstalled QGIS 2.2 from AUR, pulling all its needed dependencies... but I still have the same issue... – Victor Mar 6 '14 at 15:29
  • I solved the same problem by uninstalling my python. Hope this helps! – Sven Wang May 26 '15 at 2:59
1

The Processing plugin uses the Qsci.so module (Python binding for QScintilla2) for creating an embedded code editor widget. This is the same Qt code editor widget used for the PyQGIS (Python) Console.

While you may have QScintilla2 C++ lib installed, you may not have install its Python binding. Simply opening a Python console in your shell and issuing the following will tell you if it is available:

import PyQt4.Qsci 

If not install it. Not sure what package manager Manjaro uses, but for apt on Ubuntu, there is a separate python-qscintilla2 package.

Otherwise, you could install from source, if you want the latest.

  • Also, QGIS 2.2 has recently been released. You may wish to consider installing that version, instead of the dev/testing version. – dakcarto Mar 3 '14 at 4:50
0

Problem solved by update of QGIS in AUR.
https://aur.archlinux.org/packages/qgis/

Needed to downgrade some packages (pyqt4dev, sipdev, and qscintilla). See link above for details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.