[GH-ISSUE #100] KeyError Unhandled error: <class 'KeyError'>, 'count', <traceback object at 0x7fec41ed67c0> #47

Closed
opened 2026-05-06 12:36:41 +02:00 by BreizhHardware · 13 comments

Originally created by @simon-pp on GitHub (Jan 9, 2024).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/100

terravision draw --source --show

Key error from debug, terraform provider is aws

Traceback (most recent call last): File "terravision/terravision", line 245, in <module> cli( File "/home/simon/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/home/simon/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/simon/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/simon/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "terravision/terravision", line 169, in draw tfdata = compile_tfdata(source, varfile, debug, annotate) File "terravision/terravision", line 72, in compile_tfdata tfdata = graphmaker.handle_special_resources(tfdata) File "terravision/modules/graphmaker.py", line 462, in handle_special_resources tfdata = getattr(resource_handlers, handler)(tfdata) File "terravision/modules/resource_handlers.py", line 154, in aws_handle_subnet_azs tfdata["meta_data"][az]["count"] = tfdata["meta_data"][subnet]["count"] KeyError: 'count'

Originally created by @simon-pp on GitHub (Jan 9, 2024). Original GitHub issue: https://github.com/patrickchugh/terravision/issues/100 terravision draw --source <path to tf files> --show Key error from debug, terraform provider is aws `Traceback (most recent call last): File "terravision/terravision", line 245, in <module> cli( File "/home/simon/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/home/simon/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/simon/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/simon/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "terravision/terravision", line 169, in draw tfdata = compile_tfdata(source, varfile, debug, annotate) File "terravision/terravision", line 72, in compile_tfdata tfdata = graphmaker.handle_special_resources(tfdata) File "terravision/modules/graphmaker.py", line 462, in handle_special_resources tfdata = getattr(resource_handlers, handler)(tfdata) File "terravision/modules/resource_handlers.py", line 154, in aws_handle_subnet_azs tfdata["meta_data"][az]["count"] = tfdata["meta_data"][subnet]["count"] KeyError: 'count'`
Author
Owner

@macindra commented on GitHub (Feb 27, 2024):

It happens the same for me. Any update about this error?

<!-- gh-comment-id:1966334831 --> @macindra commented on GitHub (Feb 27, 2024): It happens the same for me. Any update about this error?
Author
Owner

@haisumriaz-tkxel commented on GitHub (Apr 9, 2024):

now we stuck on this error here @patrickchugh

<!-- gh-comment-id:2044594878 --> @haisumriaz-tkxel commented on GitHub (Apr 9, 2024): now we stuck on this error here @patrickchugh
Author
Owner

@Dgmmarian commented on GitHub (Apr 16, 2024):

hi, any updates here?

<!-- gh-comment-id:2058595168 --> @Dgmmarian commented on GitHub (Apr 16, 2024): hi, any updates here?
Author
Owner

@patrickchugh commented on GitHub (Apr 16, 2024):

Working on a new version that fixes a lot of bugs will be pushed to main in 2 or 3 days

<!-- gh-comment-id:2058739494 --> @patrickchugh commented on GitHub (Apr 16, 2024): Working on a new version that fixes a lot of bugs will be pushed to main in 2 or 3 days
Author
Owner

@haisumriaz-tkxel commented on GitHub (Apr 16, 2024):

Thanks for the feedback! Much Appreciated!

<!-- gh-comment-id:2058873903 --> @haisumriaz-tkxel commented on GitHub (Apr 16, 2024): Thanks for the feedback! Much Appreciated!
Author
Owner

@patrickchugh commented on GitHub (Apr 16, 2024):

If you want to be sure your TF code will work please share with me so I can run tests before release the next version

<!-- gh-comment-id:2059185440 --> @patrickchugh commented on GitHub (Apr 16, 2024): If you want to be sure your TF code will work please share with me so I can run tests before release the next version
Author
Owner

@haisumriaz-tkxel commented on GitHub (Apr 16, 2024):

it wasn't much, just modularised AWS specific code to create a basic vpc, and subnet to launch an ec2 instance, nothing special

<!-- gh-comment-id:2059332520 --> @haisumriaz-tkxel commented on GitHub (Apr 16, 2024): it wasn't much, just modularised AWS specific code to create a basic vpc, and subnet to launch an ec2 instance, nothing special
Author
Owner

@AlexisDaciuk commented on GitHub (May 9, 2024):

+1 , same error here, is that release coming soon?

<!-- gh-comment-id:2103380874 --> @AlexisDaciuk commented on GitHub (May 9, 2024): +1 , same error here, is that release coming soon?
Author
Owner

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

@AlexisDaciuk @haisumriaz-tkxel can you try with the latest release?

<!-- gh-comment-id:2106370958 --> @patrickchugh commented on GitHub (May 12, 2024): @AlexisDaciuk @haisumriaz-tkxel can you try with the latest release?
Author
Owner

@AlexisDaciuk commented on GitHub (May 13, 2024):

Hi, now it fails with

Unhandled error: <class 'IndexError'>, list index out of range, <traceback object at 0x7fb3bfb0c640>

Unfortunately I won't be able to debug more this week, maybe friday, what info will be useful for debugging this?

<!-- gh-comment-id:2108616345 --> @AlexisDaciuk commented on GitHub (May 13, 2024): Hi, now it fails with Unhandled error: <class 'IndexError'>, list index out of range, <traceback object at 0x7fb3bfb0c640> Unfortunately I won't be able to debug more this week, maybe friday, what info will be useful for debugging this?
Author
Owner

@patrickchugh commented on GitHub (Apr 14, 2026):

@simon-pp @AlexisDaciuk @haisumriaz-tkxel Can this issue be closed?

<!-- gh-comment-id:4243805723 --> @patrickchugh commented on GitHub (Apr 14, 2026): @simon-pp @AlexisDaciuk @haisumriaz-tkxel Can this issue be closed?
Author
Owner

@patrickchugh commented on GitHub (Apr 27, 2026):

Closing due to no response

<!-- gh-comment-id:4325144954 --> @patrickchugh commented on GitHub (Apr 27, 2026): Closing due to no response
Author
Owner

@haisumriaz-tkxel commented on GitHub (Apr 27, 2026):

Hi Patrick

Sorry for late response, please mark this as closed as i did not get to
work furthur on this. also ill be closing this organizational github
account. ill try again using my personal github account. if i get any
furthur issues, ill let you know in a new separate issue. Thanks you for
following up on this. Really appreciate it.

On Mon, 27 Apr 2026, 12:47 pm Patrick Chugh, @.***>
wrote:

patrickchugh left a comment (patrickchugh/terravision#100)
https://github.com/patrickchugh/terravision/issues/100#issuecomment-4325144954

Closing due to no response


Reply to this email directly, view it on GitHub
https://github.com/patrickchugh/terravision/issues/100#issuecomment-4325144954,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A25FHUGEJD7MVVSZ2MULAH34X4GAZAVCNFSM6AAAAACXYZO5HKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DGMRVGE2DIOJVGQ
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
https://github.com/notifications/mobile/ios/A25FHUED22MG5B4GQBA2KQ34X4GAZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMZSGUYTINBZGU2KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y
and Android
https://github.com/notifications/mobile/android/A25FHUBFH4VTTRNYOEUGRJT4X4GAZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMZSGUYTINBZGU2KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI.
Download it today!
You are receiving this because you were mentioned.Message ID:
@.***>

<!-- gh-comment-id:4327195462 --> @haisumriaz-tkxel commented on GitHub (Apr 27, 2026): Hi Patrick Sorry for late response, please mark this as closed as i did not get to work furthur on this. also ill be closing this organizational github account. ill try again using my personal github account. if i get any furthur issues, ill let you know in a new separate issue. Thanks you for following up on this. Really appreciate it. On Mon, 27 Apr 2026, 12:47 pm Patrick Chugh, ***@***.***> wrote: > *patrickchugh* left a comment (patrickchugh/terravision#100) > <https://github.com/patrickchugh/terravision/issues/100#issuecomment-4325144954> > > Closing due to no response > > — > Reply to this email directly, view it on GitHub > <https://github.com/patrickchugh/terravision/issues/100#issuecomment-4325144954>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A25FHUGEJD7MVVSZ2MULAH34X4GAZAVCNFSM6AAAAACXYZO5HKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DGMRVGE2DIOJVGQ> > . > Triage notifications, keep track of coding agent tasks and review pull > requests on the go with GitHub Mobile for iOS > <https://github.com/notifications/mobile/ios/A25FHUED22MG5B4GQBA2KQ34X4GAZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMZSGUYTINBZGU2KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y> > and Android > <https://github.com/notifications/mobile/android/A25FHUBFH4VTTRNYOEUGRJT4X4GAZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMZSGUYTINBZGU2KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>. > Download it today! > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
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#47
No description provided.