optapy / optapy-quickstarts

OptaPy quick starts for AI optimization: showcases many different use cases.
Apache License 2.0
19 stars 13 forks source link

optapy-quickstarts/employee-scheduling/requirements.txt installs broken werkzeug version #31

Open mknull opened 3 months ago

mknull commented 3 months ago

Werkzeug has removed legacy code in 3.0 and it broke main.py. Attempted solutions:

  1. Using werkzeug==2.2.2 has resoved the python error, however the server on localhost:5000 displays a 404.
  2. Using a star import on services (i.e. adding in main.py a line that says "from services import * ") does not resolve any potential sequence issues.
  3. Adding a trailing "/" in app.route('/thing') does not resolve the situation.
  4. Directly accessing urls works (e.g) http://127.0.0.1:5000/schedule/ is accessible
  5. On closer inspection, there is no app.route('/'), i.e. the main page is missing. Did a commit remove it by accident?
ShAssaf commented 2 months ago

I've found a solution that worked for me-

  1. downgrade werkzeug
  2. change port number from main.py:5 app.run(port=5328)

good luck