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.

No module named 'decorator' exception, fixed by installing 'decorator' package

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az webapp list

Errors:

No module named 'decorator'
Traceback (most recent call last):
python3/dist-packages/fabric/connection.py, ln 5, in <module>
    from invoke.vendor.six import StringIO
ModuleNotFoundError: No module named 'invoke.vendor.six'

...

python3/dist-packages/fabric/connection.py, ln 10, in <module>
    from decorator import decorator
ModuleNotFoundError: No module named 'decorator'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here…
  • az webapp list

Expected Behavior

Environment Summary

Linux-5.4.0-28-generic-x86_64-with-glibc2.29
Python 3.8.2
Shell: bash

azure-cli 2.0.81

Extensions:
azure-devops 0.17.0

Additional Context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

11reactions
ewhcommented, May 6, 2020

I got around this by adding the decorator package to my system python3 site-packages. I ran this:

sudo /usr/bin/pip3 install --system decorator

Should this be required? Is the Linux installation of az not fully installing all its needed dependencies?

2reactions
fengzhou-msftcommented, Aug 17, 2020

You are using an old version not from the microsoft repo. Please see instructions on updating to the latest official version: https://github.com/Azure/azure-cli/issues/14011#issue-640943121

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python error: ImportError: No module named decorator
Hello,. I've been trying to run Hail locally and have been getting this error when I try to import Hail: Traceback (most recent...
Read more >
'ImportError: No module named decorator' in google app engine
This worked for me, I installed the decorator package specifically for Python 3.4: sudo python3.4 -m pip install decorator # specifically ...
Read more >
[Fixed] ModuleNotFoundError: No module named 'decorator'
Solution Idea 1: Install Library decorator ... The most likely reason is that Python doesn't provide decorator in its standard library. You need...
Read more >
[Bug 1932531] [NEW] Missing python3-decorator dependency
... No module named 'decorator' The easy fix is to install python3-decorator, this is a dependency for the corresponding debian package in ...
Read more >
No module named 'decorator' - Apple Silicon - Faceswap Forum
PID: 18235 09/06/2022 15:42:37 MainProcess MainThread launcher _test_for_tf_version DEBUG Installed Tensorflow Version: 2.9 09/06/2022 ...
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