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

Partially Unitialized error when using module #14

Closed
jwitko opened this issue Feb 8, 2021 · 1 comment
Closed

Partially Unitialized error when using module #14

jwitko opened this issue Feb 8, 2021 · 1 comment

Comments

@jwitko
Copy link
Contributor

jwitko commented Feb 8, 2021

OS: Ubuntu 18.04.5 LTS

Error: failed to execute "/bin/sh": Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.1/x64/bin/kms-encryption", line 33, in <module>
    sys.exit(load_entry_point('kms-encryption-toolbox==0.1.7', 'console_scripts', 'kms-encryption')())
  File "/opt/hostedtoolcache/Python/3.9.1/x64/bin/kms-encryption", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/opt/hostedtoolcache/Python/3.9.1/x64/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 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  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 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/site-packages/kmsencryption/__init__.py", line 1, in <module>
    from kmsencryption.lib import encrypt
  File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/site-packages/kmsencryption/lib.py", line 5, in <module>
    import aws_encryption_sdk
  File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/site-packages/aws_encryption_sdk/__init__.py", line 19, in <module>
    from aws_encryption_sdk.caches.local import LocalCryptoMaterialsCache  # noqa
  File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/site-packages/aws_encryption_sdk/caches/__init__.py", line 25, in <module>
    from ..internal.formatting.encryption_context import serialize_encryption_context
  File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/site-packages/aws_encryption_sdk/internal/formatting/__init__.py", line 14, in <module>
    from .serialize import serialize_header
  File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/site-packages/aws_encryption_sdk/internal/formatting/serialize.py", line 17, in <module>
    import aws_encryption_sdk.internal.defaults
  File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/site-packages/aws_encryption_sdk/internal/defaults.py", line 16, in <module>
    import aws_encryption_sdk.identifiers
  File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/site-packages/aws_encryption_sdk/identifiers.py", line 18, in <module>
    from cryptography.hazmat.primitives.asymmetric import ec, padding, rsa
  File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/site-packages/cryptography/hazmat/primitives/asymmetric/padding.py", line 10, in <module>
    from cryptography.hazmat.primitives.asymmetric import rsa
  File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py", line 20, in <module>
    from cryptography.hazmat.primitives.asymmetric.padding import AsymmetricPadding
ImportError: cannot import name 'AsymmetricPadding' from partially initialized module 'cryptography.hazmat.primitives.asymmetric.padding' (most likely due to a circular import) (/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/site-packages/cryptography/hazmat/primitives/asymmetric/padding.py)
@jwitko
Copy link
Contributor Author

jwitko commented Feb 8, 2021

Turns out this was an issue in the Cryptography module. Issue was resolved in pyca/cryptography#5758

Our tests were failing using version 3.4 and the newly released 3.4.1 fixes the tests.

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

1 participant