Closed eduardkieser closed 2 years ago
What is the exact exception? I don't get an error with 3.1.1.
Apologies, it seems to be a combination between the Bokeh and Jinja2 version. So templates.py in bokey lib, so not stricktly speaking a PX4/flight_review
problem.
Traceback (most recent call last):
File "/home/eduard/workspace/flight_review/app/./serve.py", line 12, in <module>
from bokeh.application import Application
File "/home/eduard/.pyenv/versions/bc395/lib/python3.9/site-packages/bokeh/application/__init__.py", line 28, in <module>
from .application import Application
File "/home/eduard/.pyenv/versions/bc395/lib/python3.9/site-packages/bokeh/application/application.py", line 33, in <module>
from ..document import Document
File "/home/eduard/.pyenv/versions/bc395/lib/python3.9/site-packages/bokeh/document/__init__.py", line 35, in <module>
from .document import DEFAULT_TITLE ; DEFAULT_TITLE
File "/home/eduard/.pyenv/versions/bc395/lib/python3.9/site-packages/bokeh/document/document.py", line 49, in <module>
from ..core.templates import FILE
File "/home/eduard/.pyenv/versions/bc395/lib/python3.9/site-packages/bokeh/core/templates.py", line 46, in <module>
from jinja2.utils import Markup
ImportError: cannot import name 'Markup' from 'jinja2.utils' (/home/eduard/.pyenv/versions/bc395/lib/python3.9/site-packages/jinja2/utils.py)
Packages in my venv:
bokeh==2.1.1
Jinja2==3.1.1
I'm facing the same problem, it seems like by upgrading the bokeh==2.1.1 to bokeh==2.4.2(latest) can be fix this error. But need to test first.
I have tested that if upgrade from bokeh 2.1.1 to 2.4.2 would broke the program, instead make sure that Jinja2 use for example 3.0.0 instead of latest 3.1.1.
Should be resolved with https://github.com/PX4/flight_review/pull/238
The jinja2 verion is not pinned in the requirements.txt file, mine installed 3.1.1, which breaks the Markup import in templates.py
Seems to do the trick.