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

1 Answer 1

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.

1
  • 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. Nov 23, 2017 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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