PrateekKumarSingh / AzViz

⚡ ☁ Azure Visualizer aka 'AzViz' : A #powershell module to automatically generate Azure resource topology diagrams by just typing a PowerShell cmdlet and passing the name of one or more Azure Resource groups
MIT License
584 stars 146 forks source link

Error formatting a string: Index (zero based) must be greater... #115

Open leolegenie opened 1 year ago

leolegenie commented 1 year ago

Hello

First of all thanks for providing this very nice utility!

We experience the error below with one of our resource groups.

It only appears when we set Category Depth to 2 AND Label Verbosity to 2.

When we only set Category Depth to 2 with Label Verbosity 1 it works. And also the other way round.

We then tried to filter out the types to pinpoint which one is probelmatic and it seems to be:

microsoft.compute/virtualmachinescalesets/virtualmachines (so the VMs of a Virtual Machine Scale Set).

If we exclude that the error does not appear. Interestingly the scale set is still visible even if we filter (at least partially).

Get-ImageNode: /home/user/.local/share/powershell/Modules/AzViz/1.2.1/src/private/ConvertTo-DOTLangauge.ps1:182
Line |
 182 |  …   $nodes += Get-ImageNode -Name "$tocateg/$to".tolower() -Rows ($to,  …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Error formatting a string: Index (zero based) must be greater than or equal to zero and less than the size of the
     | argument list..

Regards, Leo