Problem in Guided mode

Auto takeoff with guided mode from the mission planner is working well.

But the drone is flipping while giving takeoff command from dronekit with raspberry pi

Please help!

Ths happens even I downgrade the firmware to 4.0.7

Not sure I can help you, but could you please state your full setup ?

Quadcopter, 330kv motors, 40A Escs, 17 inch, Cube orange, 6s 8000 mah li ion.
Drone kit: 2.9.2, raspberry pi 4

OK. Which exact Dronekit command lines are you executing to take off ? Also, I’d strongly recommend you to get/buildt a smaller drone (say based on 3S batteries, something like an F450 frame) for these initial experiments, as you will progress faster at a lower cost.

Running the basic file

If I try to take off from Mission Planner it works Fine
here is the video

OK. If you take off by radio and in altitude hold, by ONLY using the throttle (that means only lift the throttle stick, do not use yaw, roll or pitch on the radio), how does the drone behave ? Could you make a video of that ?

Sorry I can’t make a video now
We have dismantled it

It was taking off perfectly in loiter mode.
I was not using other channels to takeoff. Only throttle

OK. then it’s very hard to help you, if you don’t have the drone actually running.