Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using QGIS 1.7.4., downloaded April 2012, but receive an import error loading the class QgsVectorFieldSymbolLayer. As i understand this class has been added in the Python bindings on 2011-11-15. Does anybody know whether this class has already been included and if so, what else can be wrong?

No, while executing a Python script. First line:

from qgis.core import (QgsSymbolLayerV2Registry, QgsDataSourceURI, QgsVectorLayer, QgsVectorFieldSymbolLayer, QgsSymbolLayerV2AbstractMetadata, QgsCoordinateReferenceSystem, QgsMapLayer, QgsField, QgsComposition, QgsComposerLegend, QgsComposerLabel, QgsRectangle, QgsFeature, QgsMapLayerRegistry, QgsGraduatedSymbolRendererV2, QgsSymbolV2, QgsRendererRangeV2, QgsMarkerSymbolLayerV2)

All classes are imported okay, except QgsVectorFieldSymbolLayer.

share|improve this question
When do you get this error? On loading QGIS? – Nathan W Apr 23 '12 at 23:48

The QGIS 1.7.4 release does not have a .sip file for that binding.

It is, however, present in the master branch, having been added about 5 months ago, as you have noted. Currently, QGIS is in a feature freeze for version 1.8. The developers have also decided to not have a 1.8 branch, but create a release from the master branch. So, at this time, I not quite sure if that class will be available via Python in 1.8 (though I surmise it will be).

You might consider posting your question to the the developers list.

share|improve this answer
If you want to work with the new binding, you could try compiling QGIS yourself. Not too bad once you have the prerequisites installed. All in the well-annotated INSTALL doc. If you're on Mac OS X 10.7.3, you might take a look at a simple bash script I wrote for generating a nightly build. – dakcarto Apr 25 '12 at 1:59
Many thanks for this answer. I understand it just needs some time. I will post the question to the developers list. – user7139 Apr 25 '12 at 11:06
@Sebastian: Please consider accepting the answer. – underdark May 25 '12 at 12:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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