This error usually take placed when receptor or ligand were inappropiatly convert to .pdbqt file((almost because of the cofactor or some complex structures in the ligand or receptor))
You can placed your protein.pdb file or ligand .sdf file, so I check them.
Flexible docking is when some residues in the interacting bodies (receptor and ligand) are kept flexible, leaving the rest of the part rigid. Please describe how you prepare your flexible residues and ligand atoms? Can you share a receptor coordinate file that includes all hydrogen atoms? Then, I can help you to solve this problem. Meanwhile, you can use the attached python script to build your flexible receptor. Indeed, your supervisor, Dr. Arab, is an expert researcher in this field and he would probably support you in doing flexible docking.