Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thank you @Kadir for tour help , it's guide me getter to identify the problem with my code . I still have one question : How to change renderer type from Rule-based to single symbol? Or how to directly change the symbology of a Rule-bases
Thank you for tour answer, but when i run tour code it gives me this errer: AttributeError: 'QgsRuleBasedRenderer' object has no attribute 'setSymbol' And every time i try to change it ,like instead of setsymbol i write only symbol . Sometimes this error ut shows up with renderer.