cloudformation-cli icon indicating copy to clipboard operation
cloudformation-cli copied to clipboard

ImportError: cannot import name 'NoReturn'

Open IMShikher opened this issue 4 years ago • 0 comments

Hi,

I am executing this command: "cfn test" and I am getting this unhandled exception:

[2021-07-02T19:26:35Z] DEBUG    - pytest args: ['-c', '/private/var/folders/5g/qmkf17pj7kn2mztvfcrrn_m0nyyk9r/T/pytest_v301gq80.ini', '-m', 'not update and not list']
[2021-07-02T19:26:35Z] DEBUG    - Unhandled exception
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rpdk/core/cli.py", line 100, in main
    args.command(args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rpdk/core/test.py", line 205, in test
    invoke_test(args, project, overrides, None)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rpdk/core/test.py", line 233, in invoke_test
    ret = pytest.main(pytest_args, plugins=[plugin])
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/config/__init__.py", line 143, in main
    config = _prepareconfig(args, plugins)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/config/__init__.py", line 319, in _prepareconfig
    pluginmanager=pluginmanager, args=args
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/helpconfig.py", line 100, in pytest_cmdline_parse
    config: Config = outcome.get_result()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/config/__init__.py", line 1003, in pytest_cmdline_parse
    self.parse(args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/config/__init__.py", line 1283, in parse
    self._preparse(args, addopts=addopts)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/config/__init__.py", line 1172, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/manager.py", line 299, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/importlib_metadata/__init__.py", line 167, in load
    module = import_module(match.group('module'))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 936, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 936, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
    exec(co, module.__dict__)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/hypothesis/__init__.py", line 25, in <module>
    from hypothesis.control import (
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
    exec(co, module.__dict__)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/hypothesis/control.py", line 18, in <module>
    from typing import NoReturn, Union
ImportError: cannot import name 'NoReturn'](url)```

[rpdk.log](https://github.com/aws-cloudformation/cloudformation-cli/files/6756679/rpdk.log)

Attached the rpdk.log file.

IMShikher avatar Jul 02 '21 19:07 IMShikher