0

I have a Flask App with Python 3.9 (I used different versions of Python same problem) my iis server Version is 10.

In my App I have 4 different post routes. 3 of them work like a charm. When I call the fourth one which is almost the same like the other 3, I get a 500 error and I have no idea why. When I start the Flask server without iis, every post route work. I did every tutorial here or on different websites but my problem is still there. Does anybody know this problem or have a solution why one of the methods won't work?

Jurgen Strydom
  • 3,540
  • 1
  • 23
  • 30
  • 1
    Check error logs, definitely something must be over there. – Laxmikant May 05 '21 at 06:54
  • According to your description, it is impossible to know the problem cause by, you need to post your error message. – samwu May 05 '21 at 09:18
  • How did you set up Python on IIS? https://learn.microsoft.com/en-us/visualstudio/python/configure-web-apps-for-iis-windows?view=vs-2019#configure-the-httpplatform-handler HttpPlatformHandler is recommended. – Lex Li May 05 '21 at 20:24

1 Answers1

0

This is an output of my log file:

2021-05-06 09:43:27.854195: wfastcgi.py will restart when files in C:\masterarbeit\flask\ are changed: .((.py)|(.config))$ 2021-05-06 09:43:27.869792: wfastcgi.py 3.0.0 initialized 2021-05-06 09:43:28.479183: wfastcgi.py exiting because upload\Teacup.py has changed, matching .((.py)|(.config))$ 2021-05-06 09:43:28.510435: Running on_exit tasks

The error come when i call an ajax script. this script works when i start the flask server without iis. The ajax script calls a python method which returns a json string. The other ajax scripts which are similar work like a charm.

UPDATE: when i change the json return e.g. to a single char instead of the json string, it works. The error come in this line: fig = go.Figure()