[Qgis-developer] Nightly & OS X Log Messages Panel - Python and QT

Larry Shaffer larrys at dakotacarto.com
Thu Apr 28 20:30:14 PDT 2016


Hi Thomas,

On Thu, Apr 28, 2016 at 10:54 AM, Thomas Endres <endres.thomas at gmail.com>
wrote:

> HI All,
>
> I have been using the nightly builds for quite some time with OS X 10.11.4.
>
> Couple of questions regarding errors I am seeing in the 'Log Messages
> Panel':
>
> 1) Are QT Painter errors due to work with 3.0? Should they be disregarded
> or reported? Lots of the following after a change in zoom level:
>
> QPainter::begin: Paint device returned engine == 0, type: 3
>
> 2016-04-28T11:31:54 1 QPainter::setRenderHint: Painter must be active to
> set rendering hints
>
> 2016-04-28T11:31:54 1 QPainter::translate: Painter not active
>
> 2016-04-28T11:31:54 1 QPainter::end: Painter not active, aborted
>

This is a bug somewhere that is trying to set a property on a non-existent
QPainter. That might be tricky to track down. Doesn't seem to be hurting
anything, though.


> 2) Ever since I can remember I have had the following appear in the
> 'Python warning' tab:
>
> 2016-04-28T11:27:20 1
> warning:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py:186:
> ImportWarning: Not importing directory
> '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/mpl_toolkits':
> missing __init__.py
>

This is a system-installed module (not part of the QGIS packaging). You can
just ignore the warning.

You could try the following to get rid of the warning:

sudo touch /System/Library/Frameworks/Python.framework/Versions/2.7/
Extras/lib/python/mpl_toolkits/__init__.py

Just creating a blank __init__.py may do the trick. However, due to SIP
security on 10.11.x , you may not be 'allowed' to create the file (even
with sudo). If so, you can temporarily turn off SIP, create the file, test,
then turn SIP back on [0].

Alternatively, you could try installing matplotlib Python package from
Kyngchaos.com or the official package somewhere on sys.path that will be
picked up before the system install of matplotlib. I don't think this will
really get rid of the warning, which may happen whenever the system paths
are parsed.

[0]
http://arstechnica.com/apple/2015/09/os-x-10-11-el-capitan-the-ars-technica-review/8/

Regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota

file, filename, etc = imp.find_module(subname, path)
>
> traceback: File "<string>", line 1, in <module>
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/qgis/utils.py",
> line 326, in startPlugin
>
> plugins[packageName] = package.classFactory(iface)
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/__init__.py",
> line 29, in classFactory
>
> from MetaSearch.plugin import MetaSearchPlugin
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/qgis/utils.py",
> line 600, in _import
>
> mod = _builtin_import(name, globals, locals, fromlist, level)
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/plugin.py",
> line 33, in <module>
>
> from MetaSearch.dialogs.maindialog import MetaSearchDialog
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/qgis/utils.py",
> line 600, in _import
>
> mod = _builtin_import(name, globals, locals, fromlist, level)
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/dialogs/maindialog.py",
> line 43, in <module>
>
> from owslib.csw import CatalogueServiceWeb
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/qgis/utils.py",
> line 600, in _import
>
> mod = _builtin_import(name, globals, locals, fromlist, level)
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/owslib/csw.py",
> line 18, in <module>
>
> from owslib.util import OrderedDict
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/qgis/utils.py",
> line 600, in _import
>
> mod = _builtin_import(name, globals, locals, fromlist, level)
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/owslib/util.py",
> line 13, in <module>
>
> import pytz
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/qgis/utils.py",
> line 600, in _import
>
> mod = _builtin_import(name, globals, locals, fromlist, level)
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/pytz/__init__.py",
> line 29, in <module>
>
> from pkg_resources import resource_stream
>
> File
> "/Applications/QGIS_2.15-dev.app/Contents/MacOS/../Resources/python/qgis/utils.py",
> line 600, in _import
>
> mod = _builtin_import(name, globals, locals, fromlist, level)
>
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",
> line 2813, in <module>
>
> add_activation_listener(lambda dist: dist.activate())
>
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",
> line 686, in subscribe
>
> callback(dist)
>
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",
> line 2813, in <lambda>
>
> add_activation_listener(lambda dist: dist.activate())
>
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",
> line 2346, in activate
>
> list(map(declare_namespace, self._get_metadata('namespace_packages.txt')))
>
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",
> line 1942, in declare_namespace
>
> _handle_ns(packageName, path_item)
>
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",
> line 1899, in _handle_ns
>
> loader = importer.find_module(packageName)
>
>
> Install or path errors on my end?
>
>
> Thanks!
>
> -tom
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160428/d2ebd58c/attachment.html>


More information about the Qgis-developer mailing list