Wednesday 29 April 2015

pyqgis - QGIS python error


I've been using QGIS for a while and haven't had any major issues so far, but now I am getting the following Python error messages and certain plugins won't work. Any Ideas?




Failed to open Python console:



Traceback (most recent call last):
File "", line 2, in
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/console/console.py", line 46, in show_console
_console = PythonConsole(parent)
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/console/console.py", line 83, in __init__
self.console = PythonConsoleWidget(self)
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/console/console.py", line 109, in __init__
self.shell = ShellScintilla(self)
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/console/console_sci.py", line 86, in __init__

self.refreshSettingsShell()
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/console/console_sci.py", line 141, in refreshSettingsShell
self.setCaretForegroundColor(cursorColor)
TypeError: setCaretForegroundColor(self, QColor): argument 1 has unexpected type 'unicode'


Python version:
2.7.10 (default, Jul 30 2016, 18:31:42)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]


QGIS version:
2.18.0 'Las Palmas', exported

Python path:
['/Users/Harry/.qgis2/python/plugins/processing', '/Applications/QGIS.app/Contents/MacOS/../Resources/python', u'/Users/Harry/.qgis2/python', u'/Users/Harry/.qgis2/python/plugins', '/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins', '/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7', '/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/scipy-override', '/Library/Python/2.7/site-packages/numpy-override', '/Library/Python/2.7/site-packages/matplotlib-override', '/Library/Frameworks/GDAL.framework/Versions/2.1/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/PySAL-1.12.0-py2.7.egg', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Library/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', u'/Users/Harry/.qgis2//python', '/Users/Harry/.qgis2/python/plugins/gearthview/ext-libs', u'/Users/Harry/Documents/Work/RCA/10.yr_2/ADS_3/mapping/qgs']

I also get this error when trying to run Cartographic Line Generalization plugin:


2016-12-07T15:01:02 1   
Traceback (most recent call last):
File "/Users/Harry/.qgis2/python/plugins/CartoLineGen-master/cartolinegen.py", line 210, in run

self.count_vertices()
File "/Users/Harry/.qgis2/python/plugins/CartoLineGen-master/cartolinegen.py", line 234, in count_vertices
feat = inLayer.getFeatures()
AttributeError: 'QgsRasterLayer' object has no attribute 'getFeatures'


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...