Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import error #6

Open
yang-guoli opened this issue Apr 11, 2022 · 5 comments
Open

import error #6

yang-guoli opened this issue Apr 11, 2022 · 5 comments

Comments

@yang-guoli
Copy link

hi, i tried to install the prolintpy use your thirdth methods and success. But when i import the prolintpy, the error occur as follows:
屏幕截图 2022-04-11 195753

@yang-guoli yang-guoli changed the title install error import error Apr 11, 2022
@bisejdiu
Copy link
Member

I don't think I've seen this error before. Can you check what your Bokeh version is:

import bokeh
bokeh.__version__
1.4.0

ProLint relies on an old version of Bokeh. We've updated it internally and will push the update soon online, but for now you have to make sure that you use the 1.4.0 version.

@yang-guoli
Copy link
Author

@bisejdiu The boketh version is 1.4.0.
image

@yang-guoli
Copy link
Author

I solved the probelm above by as follow:
the code in the /../envs/prolint/lib/python3.7/site-packages/bokeh/document/document.py:

from jinja2 import Environment, Markup, FileSystemLoader

changing into:
from jinja2 import Environment, FileSystemLoader
from markupsafe import Markup
.
The methods according into: holoviz/panel#3257

@bisejdiu
Copy link
Member

Thank you for figuring this out and for posting it here!
I'm keeping this issue open, if that's ok, in case anyone else encounters the same problem.

@danielpastor97
Copy link
Member

To solve this issue in the current version of prolintpy the file that you need to edit is:

/../anaconda3/envs/prolint/lib/python3.7/site-packages/bokeh/core/templates.py

and change the import line:

from jinja2 import Environment, Markup, FileSystemLoader

into:

from jinja2 import Environment, FileSystemLoader
from markupsafe import Markup

as was discussed above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants