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.

azure-common: Imports adal/msrestazure but they are not listed as requirements

See original GitHub issue
  • Package Name: azure-common
  • Package Version: 1.1.22
  • Operating System: Fedora 37
  • Python Version: 3.11.0b3

Describe the bug The azure-common package imports adal and msrestazure in azure/common/client_factory.py, but neither appear in install_requires within setup.py. That causes an error during Fedora RPM package builds because azure.common.client_factory cannot be imported:

Check import: azure.common.client_factory
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/import_all_modules.py", line 171, in <module>
    main()
    ^^^^^^
  File "/usr/lib/rpm/redhat/import_all_modules.py", line 167, in main
    import_modules(modules)
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/rpm/redhat/import_all_modules.py", line 100, in import_modules
    importlib.import_module(module)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 939, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/builddir/build/BUILDROOT/python-azure-common-1.1.22-1.fc37.x86_64/usr/lib/python3.11/site-packages/azure/common/client_factory.py", line 17, in <module>
    import adal
    ^^^^^^^^^^^
ModuleNotFoundError: No module named 'adal'

To Reproduce Steps to reproduce the behavior:

  1. Install azure-common in a virtual environment
  2. Run python and type import azure.common.client_factory
  3. Traceback appears

Expected behavior I expect to be able to import modules from azure.common successfully.

If I manually add msrestazure as a dependency during the RPM build, both msrestazure and adal are installed and all of the import checks pass.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
majorcommented, Jun 23, 2022

@xiangyan99 Yes, I can work around it during the RPM packaging by installing msrestazure/adal before running the import checks. I wanted to ensure that you knew about the missing install_requires here. Feel free to close this one.

1reaction
kristapraticocommented, Jun 22, 2022

@major Thanks for reporting this issue, we’ll take a look asap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regulations & Requirements
Additional information about regulations and requirements governing agricultural exports and imports is available from other USDA agencies and state ...
Read more >
TSCA Requirements for Importing Chemicals | US EPA
Describes various TSCA import and export requirements under various Sections of TSCA and the CFR.
Read more >
Trying to set up python for Azure on a Mac using vscode but ...
I am getting an Import "azure.common.credentials" could not be resolved ... on the Mac, which is deprecated but I think required on the...
Read more >
Notice of Decision To Revise Import Requirements for the ...
The commenter stated that APHIS should not revise requirements for imports ... These conditions will be listed in the Fruits and Vegetables ...
Read more >
21 CFR Part 1313 - Importation of Listed Chemicals - eCFR
(a) Each regulated person who seeks to import a listed chemical that meets ... in § 1310.04(f) are not required to file an...
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