optapy-quickstarts/employee-scheduling/requirements.txt installs broken werkzeug version
Werkzeug has removed legacy code in 3.0 and it broke main.py. Attempted solutions:
- Using werkzeug==2.2.2 has resoved the python error, however the server on localhost:5000 displays a 404.
- 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.
- Adding a trailing "/" in app.route('/thing') does not resolve the situation.
- Directly accessing urls works (e.g) http://127.0.0.1:5000/schedule/ is accessible
- On closer inspection, there is no app.route('/'), i.e. the main page is missing. Did a commit remove it by accident?
I've found a solution that worked for me-
- downgrade werkzeug
- change port number from main.py:5 app.run(port=5328)
good luck
Same problem here. Latest version of flask worked for me.
You might want to try Timefold Solver for Python (the employee scheduling quickstart is here). Timefold Solver for Python is a fork of OptaPy that was created by the original OptaPy team (OptaPy was created by the OptaPlanner team). Do note Timefold Solver for Python has some API changes from OptaPy (most notably, using Annotated instead of method decorators, which allows for more concise code since you do not need to define getters/setters).