This should be a problem with your Python configuration on iis, you can refer to the link below about how to configure python on iis:
configure-web-apps-for-iis-windows.
installing-python-on-iis.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.