question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No module named 'defusedxml'

See original GitHub issue

The error occurs when you launch the containerized app via docker-compose up

scout-cli    | Traceback (most recent call last):
scout-cli    |   File "/venv/bin/scout", line 33, in <module>
scout-cli    |     sys.exit(load_entry_point('scout-browser', 'console_scripts', 'scout')())
scout-cli    |   File "/venv/bin/scout", line 25, in importlib_load_entry_point
scout-cli    |     return next(matches).load()
scout-cli    |   File "/usr/local/lib/python3.8/importlib/metadata.py", line 77, in load
scout-cli    |     module = import_module(match.group('module'))
scout-cli    |   File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
scout-cli    |     return _bootstrap._gcd_import(name[level:], package, level)
scout-cli    |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
scout-cli    |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
scout-cli    |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
scout-cli    |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
scout-cli    |   File "<frozen importlib._bootstrap_external>", line 843, in exec_module
scout-cli    |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
scout-cli    |   File "/home/worker/app/scout/commands/__init__.py", line 1, in <module>
scout-cli    |     from .base import cli
scout-cli    |   File "/home/worker/app/scout/commands/base.py", line 12, in <module>
scout-cli    |     from scout.commands.convert import convert
scout-cli    |   File "/home/worker/app/scout/commands/convert.py", line 8, in <module>
scout-cli    |     from scout.server.extensions import store
scout-cli    |   File "/home/worker/app/scout/server/extensions/__init__.py", line 14, in <module>
scout-cli    |     from .loqus_extension import LoqusDB
scout-cli    |   File "/home/worker/app/scout/server/extensions/loqus_extension.py", line 13, in <module>
scout-cli    |     from scout.utils.scout_requests import get_request_json as api_get
scout-cli    |   File "/home/worker/app/scout/utils/scout_requests.py", line 9, in <module>
scout-cli    |     from defusedxml import ElementTree
scout-cli    | ModuleNotFoundError: No module named 'defusedxml'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
northwestwitchcommented, Feb 4, 2022

You know what I did to cause the error? I’ve removed Weasyprint and Flask_weasyprint from requirements.txt.

0reactions
northwestwitchcommented, Feb 4, 2022

It is a freeze and that’s why it was complaining for deprecated stuff

Looks like there is a new defusedxml 0.8 on its way, but not quite out yet?

Check #3136. If you remove Flask-WeasyPrint you need to install defusedxml. But you don’t need to freeze it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Fixed] ModuleNotFoundError: No module named 'defusedxml'
How to Fix “ModuleNotFoundError: No module named 'defusedxml'” in PyCharm · Open File > Settings > Project from the PyCharm menu. · Select...
Read more >
No module named 'defusedxml' · Issue #24 · roddhjav/pass ...
After installing pass-import on OS X High Sierra 10.13.3 (17.4.0 Darwin Kernel Version 17.4.0) and running > pass import --help I am ...
Read more >
No module named defusedxml.xmlrpc - ROS Answers
I'm using robot_localization offered by ROS downloaded from gihub .It can be compiled and I haven't changed anything of it.
Read more >
ModuleNotFoundError: No module named 'defusedxml'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'defusedxml' How to remove the ModuleN.
Read more >
SCOrchestrator.py fails for defusedxml package - IBM
SCOrchestrator.py", line 12, in <module> import defusedxml.ElementTree as xml ImportError: No module named defusedxml.ElementTree.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found