In my script, at the moment of having the layers loaded, I filter all the ToC layers with a unique value for all the layers.
I use the
setSubsetString('"FIELD" = \' VALUE \ '') method, but when it does not find any field with that value, it throws me the following error:
How can I solve this? I am using QGIS 2.14.