It is related to the pyttsx (text-to -speech ) python package .
In which an error is occurred while running the code.
First step: install pyttsx in raspberrypi
Second step: Download the pyttsx updated file from here https://github.com/Ishanvaid9/pyttsx-...
Third step : delete the data from pyttsx in dist-packages
Fourth step: Paste the downloaded pyttsx from https://github.com/Ishanvaid9/pyttsx-... to dist-packages .
Fifth step: write and execute the code.
Thankyou.