aws-cloudformation / aws-cloudformation/cloudformation-cli
ImportError: cannot import name 'NoReturn'
- Lingua principale
- Python
- Stelle
- 337
- Fork
- 172
- Merge medio
- 3g 5m
- PR unite (30g)
- 3
Descrizione
Hi,
I am executing this command: "cfn test" and I am getting this unhandled exception:
```[[2021-07-02T19:26:35Z] DEBUG - temporary pytest.ini path: /var/folders/5g/qmkf17pj7kn2mztvfcrrn_m0nyyk9r/T/pytest_v301gq80.ini
[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
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 "", line 978, in _gcd_import
File "", line 961, in _find_and_load
File "", line 936, in _find_and_load_unlocked
File "", line 205, in _call_with_frames_removed
File "", line 978, in _gcd_import
File "", line 961, in _find_and_load
File "", line 936, in _find_and_load_unlocked
File "", line 205, in _call_with_frames_removed
File "", line 978, in _gcd_import
File "", line 961, in _find_and_load
File "", line 950, in _find_and_load_unlocked
File "", 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
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
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dal punto di ingresso di cfn test e segui il traceback attraverso rpdk/core/test.py, quindi esamina la configurazione delle dipendenze Python coinvolta nel caricamento di Hypothesis. Riproduci l’ImportError con Python 3.6 e verifica che cfn test termini senza l’eccezione non gestita nell’ambiente supportato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- cli
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100