Finally I could solve the issue but the solution was weird and I have no idea what was the problem.
Simply I run this command cat old_script.py > new_script.py then I submitted the job using the new script and everything worked fine.
This is the second time I face this issue with python scripts. I have no explanation to it and I hope anyone could explain it.