Skip to content

Parsing JSON issues #1

@psachin

Description

@psachin
  • raw_input error
psachin@nubia:[refactor-parseJSON :( ]$ python Parsing_JSON.py instackenv.json 
0 b'arch'
1 b'cpu'
2 b'disk'
3 b'mac'
4 b'memory'
5 b'pm_addr'
6 b'pm_password'
7 b'pm_type'
8 b'pm_user'
Traceback (most recent call last):
  File "Parsing_JSON.py", line 20, in <module>
    inputvalues=raw_input("Enter the comma separated numeric values. ")
NameError: name 'raw_input' is not defined
  • orderable type error
psachin@nubia:[refactor-parseJSON :( ]$ python Parsing_JSON.py instackenv.json 
0 b'arch'
1 b'cpu'
2 b'disk'
3 b'mac'
4 b'memory'
5 b'pm_addr'
6 b'pm_password'
7 b'pm_type'
8 b'pm_user'
Enter the comma separated numeric values. 1
Traceback (most recent call last):
  File "Parsing_JSON.py", line 52, in <module>
    input_validation()
  File "Parsing_JSON.py", line 46, in input_validation
    if (len(sorted(data['nodes'][0].keys()))-1) > each_input_number:
TypeError: unorderable types: int() > str()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions