=== Unhandled exception === when running `cfn validate`

Offen
#1,041 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
cli

Rechercherichtung

Beginne mit dem cfn validate-Einstiegspunkt und dem fehlschlagenden _validate_fragments-Pfad in rpdk/core/fragment/generator.py, insbesondere __validate_parameters. Reproduziere den Befehl mit den gemeldeten Modulfragmenten und bestätige, dass ungültige Fragmentdaten zu einem behandelten Validierungsergebnis statt zum gezeigten TypeError führen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Logs:

[2023-11-07T02:04:57Z] DEBUG    - Logging set up successfully
[2023-11-07T02:04:57Z] DEBUG    - Running validate: Namespace(version=False, subparser_name='validate', command=<function validate at 0x0000024AF764CAF0>, verbose=0)
[2023-11-07T02:04:57Z] DEBUG    - Root directory: C:\Users\jonan\apiv2\infra\modules\proxy
[2023-11-07T02:04:57Z] DEBUG    - Loading project file 'C:\Users\jonan\apiv2\infra\modules\proxy\.rpdk-config'
[2023-11-07T02:04:57Z] INFO     - Validating your module fragments...
[2023-11-07T02:04:57Z] DEBUG    - Fragment directory: C:\Users\jonan\apiv2\infra\modules\proxy\fragments
[2023-11-07T02:04:57Z] DEBUG    - Unhandled exception
Traceback (most recent call last):
  File "C:\Users\jonan\AppData\Local\Programs\Python\Python310\lib\site-packages\rpdk\core\cli.py", line 105, in main
    args.command(args)
  File "C:\Users\jonan\AppData\Local\Programs\Python\Python310\lib\site-packages\rpdk\core\validate.py", line 14, in validate
    project.load()
  File "C:\Users\jonan\AppData\Local\Programs\Python\Python310\lib\site-packages\rpdk\core\project.py", line 560, in load
    self._load_modules_project()
  File "C:\Users\jonan\AppData\Local\Programs\Python\Python310\lib\site-packages\rpdk\core\project.py", line 583, in _load_modules_project
    self._validate_fragments(template_fragment)
  File "C:\Users\jonan\AppData\Local\Programs\Python\Python310\lib\site-packages\rpdk\core\project.py", line 614, in _validate_fragments
    template_fragment.validate_fragments()
  File "C:\Users\jonan\AppData\Local\Programs\Python\Python310\lib\site-packages\rpdk\core\fragment\generator.py", line 74, in validate_fragments
    self.__validate_parameters(raw_fragments)
  File "C:\Users\jonan\AppData\Local\Programs\Python\Python310\lib\site-packages\rpdk\core\fragment\generator.py", line 160, in __validate_parameters
    if "Type" not in parameter:
TypeError: argument of type 'NoneType' is not iterable
Vorherrschende Sprache
Python
Sterne
336
Forks
173
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus aws-cloudformation/cloudformation-cli

Alle Issues in aws-cloudformation/cloudformation-cli

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.