[GH-ISSUE #117] Crashes in [resource_handlers.py] #63

Closed
opened 2026-05-06 12:36:56 +02:00 by BreizhHardware · 1 comment

Originally created by @andrejk-phsa on GitHub (Apr 24, 2024).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/117

Traceback (most recent call last):
  File "D:\Projects\_github\_cloud\terravision\terravision", line 265, in <module>
    cli(
  File "C:\Python310\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Python310\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Python310\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Python310\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Python310\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "D:\Projects\_github\_cloud\terravision\terravision", line 188, in draw
    tfdata = compile_tfdata(source, varfile, workspace, debug, annotate)
  File "D:\Projects\_github\_cloud\terravision\terravision", line 64, in compile_tfdata
    tfdata = graphmaker.handle_special_resources(tfdata)
  File "D:\Projects\_github\_cloud\terravision\modules\graphmaker.py", line 462, in handle_special_resources
    tfdata = getattr(resource_handlers, handler)(tfdata)
  File "D:\Projects\_github\_cloud\terravision\modules\resource_handlers.py", line 301, in aws_handle_lb
    tfdata["meta_data"][connection].get("count")
KeyError: 'aws_apigatewayv2_integration.this[$default]'

Probably needs a check if connection exists:
tfdata["meta_data"].get(connection, {})

Originally created by @andrejk-phsa on GitHub (Apr 24, 2024). Original GitHub issue: https://github.com/patrickchugh/terravision/issues/117 ``` Traceback (most recent call last): File "D:\Projects\_github\_cloud\terravision\terravision", line 265, in <module> cli( File "C:\Python310\lib\site-packages\click\core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "C:\Python310\lib\site-packages\click\core.py", line 1055, in main rv = self.invoke(ctx) File "C:\Python310\lib\site-packages\click\core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "C:\Python310\lib\site-packages\click\core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "C:\Python310\lib\site-packages\click\core.py", line 760, in invoke return __callback(*args, **kwargs) File "D:\Projects\_github\_cloud\terravision\terravision", line 188, in draw tfdata = compile_tfdata(source, varfile, workspace, debug, annotate) File "D:\Projects\_github\_cloud\terravision\terravision", line 64, in compile_tfdata tfdata = graphmaker.handle_special_resources(tfdata) File "D:\Projects\_github\_cloud\terravision\modules\graphmaker.py", line 462, in handle_special_resources tfdata = getattr(resource_handlers, handler)(tfdata) File "D:\Projects\_github\_cloud\terravision\modules\resource_handlers.py", line 301, in aws_handle_lb tfdata["meta_data"][connection].get("count") KeyError: 'aws_apigatewayv2_integration.this[$default]' ``` Probably needs a check if connection exists: ``` tfdata["meta_data"].get(connection, {})```
Author
Owner

@patrickchugh commented on GitHub (May 11, 2024):

can you try again with the latest release?

<!-- gh-comment-id:2106016263 --> @patrickchugh commented on GitHub (May 11, 2024): can you try again with the latest release?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/terravision#63
No description provided.