TeamRole:~/environment/amazon-ecs-mythicalmysfits-workshop/workshop-1/app/monolith-service (master) $ docker run -p 8000:80 -e AWS_DEFAULT_REGION=$AWS_REGION -e DDB_TABLE_NAME=$TABLE_NAME monolith-service
Traceback (most recent call last):
File "mythicalMysfitsService.py", line 3, in <module>
from flask import Flask, jsonify, json, Response, request
File "/usr/local/lib/python3.8/dist-packages/flask/__init__.py", line 21, in <module>
from .app import Flask, Request, Response
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 25, in <module>
from . import cli, json
File "/usr/local/lib/python3.8/dist-packages/flask/json/__init__.py", line 21, in <module>
from itsdangerous import json as _json
ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.8/dist-packages/itsdangerous/__init__.py)
TABLE_NAME=$(aws dynamodb list-tables | jq -r .TableNames[0])
docker run -p 8000:80 -e AWS_DEFAULT_REGION=$AWS_REGION -e DDB_TABLE_NAME=$TABLE_NAME monolith-service
Downgrading markupsafe to 2.0.1 fixes the issue on my side.
pip install markupsafe==2.0.1