title: ImportError: cannot import name 'json' from itsdangerous
body: <p>I am trying to get a Flask and Docker application to work but when I try and run it using my <code>docker-compose up</code> command in my Visual Studio terminal, it gives me an ImportError called <code>ImportError: cannot import name 'json' from itsdangerous</code>. I have tried to look for possible solutions to this problem but as of right now there are not many on here or anywhere else. The only two solutions I could find are to change the current installation of MarkupSafe and itsdangerous to a higher version: <a href="https://serverfault.com/questions/1094062/from-itsdangerous-import-json-as-json-importerror-cannot-import-name-json-fr">https://serverfault.com/questions/1094062/from-itsdangerous-import-json-as-json-importerror-cannot-import-name-json-fr</a> and another one on GitHub that tells me to essentially change the MarkUpSafe and itsdangerous installation again <a href="https://github.com/aws/aws-sam-cli/issues/3661" rel="noreferrer">https://github.com/aws/aws-sam-cli/issues/3661</a>, I have also tried to make a virtual environment named <code>veganetworkscriptenv</code> to install the packages but that has also failed as well. I am currently using Flask 2.0.0 and Docker 5.0.0 and the error occurs on line eight in vegamain.py.</p>
  <p>Here is the full ImportError that I get when I try and run the program:</p>
  <pre><code>veganetworkscript-backend-1  | Traceback (most recent call last):
  veganetworkscript-backend-1  |   File &quot;/app/vegamain.py&quot;, line 8, in &lt;module&gt;
  veganetworkscript-backend-1  |     from flask import Flask
  veganetworkscript-backend-1  |   File &quot;/usr/local/lib/python3.9/site-packages/flask/__init__.py&quot;, line 19, in &lt;module&gt;
  veganetworkscript-backend-1  |     from . import json
  veganetworkscript-backend-1  |   File &quot;/usr/local/lib/python3.9/site-packages/flask/json/__init__.py&quot;, line 15, in &lt;module&gt;
  veganetworkscript-backend-1  |     from itsdangerous import json as _json
  veganetworkscript-backend-1  | ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.9/site-packages/itsdangerous/__init__.py)
  veganetworkscript-backend-1 exited with code 1
  </code></pre>
  <p>Here are my requirements.txt, vegamain.py, Dockerfile, and docker-compose.yml files:</p>
  <p>requirements.txt:</p>
  <pre><code>Flask==2.0.0
  Flask-SQLAlchemy==2.4.4
  SQLAlchemy==1.3.20
  Flask-Migrate==2.5.3
  Flask-Script==2.0.6
  Flask-Cors==3.0.9
  requests==2.25.0
  mysqlclient==2.0.1
  pika==1.1.0
  wolframalpha==4.3.0
  </code></pre>
  <p>vegamain.py:</p>
  <pre><code># Veganetwork (C) TetraSystemSolutions 2022
  # all rights are reserved.  
  # 
  # Author: Trevor R. Blanchard Feb-19-2022-Jul-30-2022
  #
  
  # get our imports in order first
  from flask import Flask # &lt;-- error occurs here!!!
  
  # start the application through flask.
  app = Flask(__name__)
  
  # if set to true will return only a &quot;Hello World&quot; string.
  Debug = True
  
  # start a route to the index part of the app in flask.
  @app.route('/')
  def index():
      if (Debug == True):
          return 'Hello World!'
      else:
          pass
  
  # start the flask app here ---&gt;
  if __name__ == '__main__':
      app.run(debug=True, host='0.0.0.0') 
  </code></pre>
  <p>Dockerfile:</p>
  <pre><code>FROM python:3.9
  ENV PYTHONUNBUFFERED 1
  WORKDIR /app
  COPY requirements.txt /app/requirements.txt
  RUN pip install -r requirements.txt
  COPY . /app
  </code></pre>
  <p>docker-compose.yml:</p>
  <pre><code>version: '3.8'
  services:
    backend:
      build:
        context: .
        dockerfile: Dockerfile
      command: 'python vegamain.py'
      ports:
        - 8004:5000
      volumes:
        - .:/app
      depends_on:
        - db
  
  #  queue:
  #    build:
  #      context: .
  #      dockerfile: Dockerfile
  #    command: 'python -u consumer.py'
  #    depends_on:
  #      - db
  
    db:
      image: mysql:5.7.22
      restart: always
      environment:
        MYSQL_DATABASE: admin
        MYSQL_USER: root
        MYSQL_PASSWORD: root
        MYSQL_ROOT_PASSWORD: root
      volumes:
        - .dbdata:/var/lib/mysql
      ports:
        - 33069:3306
  </code></pre>
  <p>How exactly can I fix this code? thank you!</p>