1

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.

  • When do you get this error? On loading QGIS? – Nathan W Apr 23 '12 at 23:48
1

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.

  • 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

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.