[GH-ISSUE #153] Missing elements from tfdata dictionary cause crashes. #89

Closed
opened 2026-05-06 12:37:19 +02:00 by BreizhHardware · 2 comments

Originally created by @ajpenner on GitHub (Dec 21, 2025).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/153

I encounter a number of crashes when running terravision draw. These are all the result of elements missing from the tfdata dictionary. I suspect this is a result of running terravision draw against a project that has changes that have not been applied.

I have a branch that "fixes" the issues for my case (not generic, and really just check if the element is in the dictionary before trying to access it). I would create a PR, but one of the checklist items is that I start a discussion first. The fixes are sufficient to unblock me, and are not thorough, I am happy to work with a reviewer to make this more robust.

For example, please see the changes at: https://github.com/patrickchugh/terravision/compare/main...ajpenner:terravision:pr/ImproveErrorHandling

If the use case is invalid, I suggest the README is updated to provide an expected starting state and I can drop the matter.

Originally created by @ajpenner on GitHub (Dec 21, 2025). Original GitHub issue: https://github.com/patrickchugh/terravision/issues/153 I encounter a number of crashes when running `terravision draw`. These are all the result of elements missing from the `tfdata` dictionary. I suspect this is a result of running `terravision draw` against a project that has changes that have not been applied. I have a branch that "fixes" the issues for my case (not generic, and really just check if the element is in the dictionary before trying to access it). I would create a PR, but one of the checklist items is that I start a discussion first. The fixes are sufficient to unblock me, and are not thorough, I am happy to work with a reviewer to make this more robust. For example, please see the changes at: https://github.com/patrickchugh/terravision/compare/main...ajpenner:terravision:pr/ImproveErrorHandling If the use case is invalid, I suggest the README is updated to provide an expected starting state and I can drop the matter.
Author
Owner

@patrickchugh commented on GitHub (Dec 22, 2025):

Hi @ajpenner Thanks for bringing this up. Can I ask if it possible to share some terraform source example or the tfdata.json (gets created when you specify --debug parameter) file you are using when you encounter the crashes?

<!-- gh-comment-id:3681138422 --> @patrickchugh commented on GitHub (Dec 22, 2025): Hi @ajpenner Thanks for bringing this up. Can I ask if it possible to share some terraform source example or the tfdata.json (gets created when you specify --debug parameter) file you are using when you encounter the crashes?
Author
Owner

@patrickchugh commented on GitHub (Dec 24, 2025):

I merged your changes. Thanks for the PR

<!-- gh-comment-id:3690275367 --> @patrickchugh commented on GitHub (Dec 24, 2025): I merged your changes. Thanks for the PR
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#89
No description provided.