0

I am writing a standalone script using QGIS processing plugins. everything works but after adding a new command it gives me some errors. The command is as folloing:

processing.runalg("grass7:v.clean",
                BK3,
                2,
                dgarc,
                None,
                -1,
                0.0001,
                BK4,
                BKerror)

dgarc is a float number and is equal to 1.BK3 and BK4 are string and are correctly defined. many other processes working with the same strings. The error is as following:

Error: Wrong parameter value: None

2

I think you need to specify the GRASS_REGION_PARAMETER as extents, e.g.,

processing.runalg("grass7:v.clean",
            BK3,
            2,
            dgarc,
            "%f , %f, %f, %f "% (xmin , xmax , ymin , ymax),
            -1,
            0.0001,
            BK4,
            BKerror)

This question had a similar issue.

  • There is no error during execution in command window but the results are not as it should be. for example the dangling arcs are not deletes. I use the sme variables in QGIS, there it works but in standalone script it does not work. I mean, it works but delivers wrong result better to say the shap-file is as same as before. – Mohamad Reza Salehi Sadaghiani Nov 23 '17 at 12:35

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.