Error with Workflow State transition not allowed

hello I’m trying to change a workflow state of some doctype by using python
but when I’m trying to change the workflow_state, it didn’t work and dialog this screen