Crashes on startup: `ImportError: cannot import name 'etree' from 'lxml'`
See original GitHub issueBabyBaby running from https://github.com/linuxserver/docker-babybuddy/pkgs/container/babybuddy/10232596?tag=1.9.1 crashes on startup:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/django/template/utils.py", line 66, in __getitem__
return self._engines[alias]
KeyError: 'django'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/django/template/backends/django.py", line 121, in get_package_libraries
module = import_module(entry[1])
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3.9/site-packages/easy_thumbnails/templatetags/easy_thumbnails_tags.py", line 8, in <module>
from .thumbnail import *
File "/usr/lib/python3.9/site-packages/easy_thumbnails/templatetags/thumbnail.py", line 12, in <module>
from easy_thumbnails.files import get_thumbnailer
File "/usr/lib/python3.9/site-packages/easy_thumbnails/files.py", line 17, in <module>
from easy_thumbnails.VIL.Image import load
File "/usr/lib/python3.9/site-packages/easy_thumbnails/VIL/Image.py", line 10, in <module>
from svglib.svglib import svg2rlg
File "/usr/lib/python3.9/site-packages/svglib/svglib.py", line 39, in <module>
from lxml import etree
ImportError: cannot import name 'etree' from 'lxml' (/usr/lib/python3.9/site-packages/lxml/__init__.py)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Installation crash: cannot import name etree - Google Groups
I installed lxml (sudo pip install lxml) and ran the sudo python again (then again in a new shell, then again after rebooting)...
Read more >ImportError: cannot import name 'etree' on Python 3.6
I am getting error while running "from lxml ...
Read more >lxml FAQ - Frequently Asked Questions
My program crashes when run with mod_python/Pyro/Zope/Plone/... Parsing and Serialisation. Why doesn't the pretty_print option reformat my XML output? Why can't ...
Read more >Topic: Axidraw CLI | Evil Mad Scientist Laboratories
from lxml import etree ImportError: cannot import name 'etree' from 'lxml' ... Try opening a terminal, and in it launch python: python3.
Read more >Summary of Python tracker Issues - Mailing List Archive
#36141: configure: error: could not find pthreads on your system durin ... #36706: Python script on startup stucks at import
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for reporting. I’ll give this a test when I can. I only just added Python 3.9 testing and it passed tests and worked fine in my local testing 🤔
This should be resolved by https://github.com/linuxserver/docker-babybuddy/pull/12 – thanks to LSIO crew!