Thanks for the reply! Looks like this was driven by python 2 compatibility issues. Btw since I posted my question I managed to resolve it by changing Flask version in the requirements.txt to
Flask==1.1.4
and removing werkzeug from it altogether.
Thanks for your reply anyway!