Closed pingyangtiaer closed 1 year ago
If I clone the current code and run docker-compose up python after I ran docker-compose build python, I got errors:
docker-compose up python
docker-compose build python
Attaching to python python | Traceback (most recent call last): python | File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main python | "__main__", mod_spec) python | File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code python | exec(code, run_globals) python | File "/usr/local/lib/python3.7/site-packages/ptvsd/__main__.py", line 446, in <module> python | main(sys.argv) python | File "/usr/local/lib/python3.7/site-packages/ptvsd/__main__.py", line 432, in main python | run() python | File "/usr/local/lib/python3.7/site-packages/ptvsd/__main__.py", line 342, in run_module python | run_module_as_main(target, alter_argv=True) python | File "/usr/local/lib/python3.7/runpy.py", line 183, in _run_module_as_main python | mod_name, mod_spec, code = _get_module_details(mod_name, _Error) python | File "/usr/local/lib/python3.7/runpy.py", line 142, in _get_module_details python | return _get_module_details(pkg_main_name, error) python | File "/usr/local/lib/python3.7/runpy.py", line 109, in _get_module_details python | __import__(pkg_name) python | File "/usr/local/lib/python3.7/site-packages/flask/__init__.py", line 19, in <module> python | from jinja2 import Markup, escape python | ImportError: cannot import name 'Markup' from 'jinja2' (/usr/local/lib/python3.7/site-packages/jinja2/__init__.py)
I searched through google, if I replace the line in the requirements.txt with Flask == 2.0.3 Everything works.
Flask == 2.0.3
fixed! thanks for that
If I clone the current code and run
docker-compose up python
after I randocker-compose build python
, I got errors:I searched through google, if I replace the line in the requirements.txt with
Flask == 2.0.3
Everything works.