Azurite icon indicating copy to clipboard operation
Azurite copied to clipboard

TypeError from AzuriteVisualizer.py

Open chris-waters opened this issue 7 years ago • 6 comments

The PS portion seems to run fine and produces the JSON output as expected. The subscription JSON file seems to be properly formatted. When running the Visualizer against the subscription JSON file produces this.

Traceback (most recent call last): File "AzuriteVisualizer.py", line 479, in main() File "AzuriteVisualizer.py", line 476, in main parseJson() File "AzuriteVisualizer.py", line 51, in parseJson vnetNode['label'] = vnet['vnetName'] TypeError: string indices must be integers

chris-waters avatar Apr 27 '17 17:04 chris-waters

I received the same error as Chris. The PS scripts generates the JSON file fine. [*] Parsing data... Traceback (most recent call last): File "AzuriteVisualizer.py", line 479, in main() File "AzuriteVisualizer.py", line 476, in main parseJson() File "AzuriteVisualizer.py", line 51, in parseJson vnetNode['label'] = vnet['vnetName'] TypeError: string indices must be integers

ekaithula1 avatar May 09 '17 18:05 ekaithula1

Same error , I inspected where it is failing and there is not any data there, feels like its choking expecting something that doesn't exist

[*] Parsing data... Traceback (most recent call last): File "AzuriteVisualizer.py", line 479, in <module> main() File "AzuriteVisualizer.py", line 476, in main parseJson() File "AzuriteVisualizer.py", line 132, in parseJson for vmNetworkIpConfiguration in subnetItem['vmNetworkConfiguration']['vmNetworkConfigurationIpConfigurations']: KeyError: 'vmNetworkConfigurationIpConfigurations'

ppptrevoro avatar Sep 20 '17 17:09 ppptrevoro

Same issue:

[*] Parsing data... Traceback (most recent call last): File "C:/GitRepos/Azurite/AzuriteVisualizer.py", line 479, in main() File "C:/GitRepos/Azurite/AzuriteVisualizer.py", line 476, in main parseJson() File "C:/GitRepos/Azurite/AzuriteVisualizer.py", line 51, in parseJson vnetNode['label'] = vnet['vnetName'] TypeError: string indices must be integers, not str

Any ideas?

Xergy avatar May 23 '18 18:05 Xergy

Can you retry?

elgreco-dev avatar May 23 '18 22:05 elgreco-dev

New error, maybe it's related to my data, so I attached a sample.

[*] Parsing data... Traceback (most recent call last): File "C:/GitRepos/Azurite/AzuriteVisualizer.py", line 483, in main() File "C:/GitRepos/Azurite/AzuriteVisualizer.py", line 480, in main parseJson() File "C:/GitRepos/Azurite/AzuriteVisualizer.py", line 136, in parseJson for vmNetworkIpConfiguration in subnetItem['vmNetworkConfiguration']['vmNetworkConfigurationIpConfi gurations']: KeyError: 'vmNetworkConfigurationIpConfigurations'

I'm running the .py scripts with the following line in git bash. I've never run python before so it might be some obvious issues I'm missings.

raffe@raffe-zbook MINGW64 /c/Python27 $ ./python.exe C:/GitRepos/Azurite/AzuriteVisualizer.py C:/GitRepos/Azurite/azure-subscription_ed347077-d367-4401-af11-a87b73bbae0e_raffe@mcsinternaltrials.onmicrosoft.com.json

ProblemJsons.zip

Thanks for your help!

Xergy avatar May 24 '18 11:05 Xergy

The issue is still there. Any solutions?

ananth-she11z avatar Jun 12 '20 07:06 ananth-she11z