Hello, this situation is fully normal. It means, that you make some wrong actions while setting this attributes.
There can be problem only with algorithms. Python call C++ code directly.
Can you share a some more details? And why you do not use ShapeTool for these purposes?
Best regards, Commenter-1.