see https://github.com/pallets/markupsafe/issues/116 please upgrade to 1.1.1 in server/ai/requirements.txt