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

Error importing "markup" from "jinja2" on startup on Ubuntu 22.04 #371

Closed
corinroyal opened this issue Jun 12, 2022 · 5 comments
Closed

Comments

@corinroyal
Copy link

On Ubuntu 22.04, using the installation instructions on the Github readme, I get the following error while starting with "lxdui start":


(lxdui-pythonenv) corinroyal@nest:~/lxdui$ lxdui start
Traceback (most recent call last):
  File "/home/corinroyal/lxdui-pythonenv/bin/lxdui", line 33, in <module>
    sys.exit(load_entry_point('LXDUI==2.2', 'console_scripts', 'lxdui')())
  File "/home/corinroyal/lxdui-pythonenv/bin/lxdui", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/corinroyal/lxdui-pythonenv/lib/python3.10/site-packages/app/run.py", line 1, in <module>
    from app.cli.cli import lxdui
  File "/home/corinroyal/lxdui-pythonenv/lib/python3.10/site-packages/app/cli/cli.py", line 6, in <module>
    from app.api import core
  File "/home/corinroyal/lxdui-pythonenv/lib/python3.10/site-packages/app/api/core.py", line 3, in <module>
    from flask import Flask, redirect
  File "/home/corinroyal/lxdui-pythonenv/lib/python3.10/site-packages/flask/__init__.py", line 19, in <module>
    from jinja2 import Markup, escape
ImportError: cannot import name 'Markup' from 'jinja2' (/home/corinroyal/lxdui-pythonenv/lib/python3.10/site-packages/jinja2/__init__.py)

I tried updating to new versions of jinja2 and flask, but then the app complained they were the wrong versions.

Thank you for any help you can provide and for making this awesome LXD GUI.

@vhajdari
Copy link
Contributor

Hi @corinroyal, did you install as root user? If so, I recommend installing with '--user' via pip.

You could also try the automated installer script here --> https://github.com/AdaptiveScale/lxdui/wiki

@corinroyal
Copy link
Author

Ah, yes. I did install as root. Thank you for your help.

@kortaone
Copy link

kortaone commented Jul 5, 2022

I change requirements txt to get more recent versions :

'< Click==8.0
'< Flask==2.1.2
'---
'> Click==6.7
'> Flask==1.0.2

Then
pip install Werkzeug==2.0.0

@pinuke
Copy link

pinuke commented Jul 24, 2022

lxdui start doesn't even run for me:

image

I'm getting the same error though with the python3 call

@vhajdari
Copy link
Contributor

vhajdari commented Jul 24, 2022 via email

xaker00 added a commit to xaker00/lxdui that referenced this issue Aug 8, 2022
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

4 participants