In your script make sure your first import is `import qgis`.  If you import
pyqt first it will set the wrong api version by default.  We set it to v2
in qgis.__init__
On 17/12/2013 1:08 AM, "rldhont" <notifications@github.com> wrote:

> In python/plugins/processing/outputs/OutputVector.py:
>
> > @@ -87,7 +87,7 @@ def getVectorWriter(self, fields, geomType, crs, options=None):
> >
> >          if self.encoding is None:
> >              settings = QSettings()
> > -            self.encoding = settings.value('/Processing/encoding', 'System')
> > +            self.encoding = settings.value('/Processing/encoding', 'System').toString()
>
> Here is the error if I remove .toString() :
>
> arguments did not match any overloaded call:
>   QgsVectorFileWriter(QString, QString, QgsFields, QGis.WkbType, QgsCoordinateReferenceSystem, QString driverName="ESRI Shapefile", QStringList datasourceOptions=QStringList(), QStringList layerOptions=QStringList(), QString newFilename=None): argument 2 has unexpected type 'QVariant'
>   QgsVectorFileWriter(QgsVectorFileWriter): argument 1 has unexpected type 'unicode'
>
> Do the script outputs/OutputVector.py has to import qgis ?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/qgis/QGIS/pull/1031/files#r8368579>
> .
>